Redirecting to
NADOS


  Prev   Next
ER Models: It is a high-level conceptual data model. It is a design or blueprint of the database. It shows the relationship among entity sets that exist in real world. The database structure is showed as a diagram known as Entity Relationship diagram. It provides logical way to visualize data. It is easy to understand by non-technical user. Components of ER Model: ermodel_components Entity: An entity is a real-world object that can be recorded in database. An entity may be person, student, place, class etc. Types of Entities: 1. Tangible: Entities which exists physically. E.g. Pencil, book etc. 2. Non-Tangible/ Intangible: Entities which exists logically. E.g. Account etc. Entity Set: set of similar type of entities that can share some attributes. It is represented by rectangle in ER diagram and as a table(relation) in relational model. entity_set Weak Entity: any entity which is not having key (primary key) attribute. weak_entity Strong Entity: any entity which is having key attribute. strong_entity Attributes: attributes are the properties describe the entities. It is represented by oval in ER diagram and as a column in relation(table). Domain: set of values for an attribute. Types of Attribute: 1. Simple and Composite attribute: Simple attribute cannot be divider furthered. It is represented by oval. e.g. Roll_No, Id, DOB, first name, city etc. simple_attr Composite attribute can be divided furthered. In this one oval can be connected by many ovals. e.g. Name, Address etc. composite_attr 2. Single and Multivalued attribute: Single attribute can have only one value. e.g. Age, Name, Roll No etc. simple_attr Multivalued attribute can have more than one value. In relational model separate table is used for multivalued attribute. e.g. Phone No etc. multivalued_attr 3. Stored and Derived: Stored: store some information in database. e.g. DOB stored_attr Derived attribute derive value from the stored value. These values can be computed at run time using stored value. e.g. Age. derived_attr 4. Key Attribute: It represents primary key (holds unique value for an attribute). It is represented by an oval with text underlined. key_attr 5. Composite Attribute: Any attribute combination of composite and multivalued. E.g. Address, Phone number. ER diagram example: Entity Set: Student Properties of student: Roll No, Name, Age, DOB, Address, Phone No etc. er_diagram Relation(table) derived from ER diagram: er_diagram_table Important Links: 1. database-management-system-er-model 2. dbms-er-model-concept 3. dbms-enhanced-er-model 4. minimization-er-diagram 5. er-model-generalization-specialization-aggregation 6. recursive-relationships Videos: 1. Entity Relationship Diagram: Entity Relationship Diagram 2. Entity: Entity set definition and types of entity relationship model diagram 3. Attributes: types of attributes in ER diagram Relationship in ER diagram: First read these links in the give sequence: 1. Relationship: Relationship in ER diagram 2. Degree of relationship: Degree of relationship 3. Cardinality ratio/Mapping: Cardinality ratio/Mapping 4. Participation Constraints: Participation Constraints: Relationship: association between two or more entities. Relationship type: a set of similar type of relationship. It is represented by diamond in ER diagram and as a separate table or column in relational model. Characteristics of relationship: 1. Degree: how many entity sets are participating. E.g. binary, ternary, unary, quaternary, N-ary etc. degree_relationship 2. Cardinality Ratio: maximum number of relationships in which an entity can participate. 3. Participation: minimum number of relationships in which an entity can participate. Total Participation of an entity = 1 Partial Participation of an entity = 0 Participation of weak entity in identifying relationship must be total i.e. participation of weak entity is always true (1). Note: If the entity is weak then its participation is total (1) but total participation of any entity doesn't make that entity weak. Types of relationship: Mapping cardinalities: shows the number of entities to which other entity can be related via relationship. 1. One to One relationship: When entity of the first entity set can be related to the at most one entity of the other entity set and vice versa. one_to_one_relationship 2. One to Many relationships: When entity of the first entity set can be related to the many entities of the other entity set. one_to_many_relationship 3. Many to Many relationships: When many entities of the first entity set can be related to the many entities of the other entity set and vice versa. many_to_many_relationship Mapping from ER Model to Relational Model mapping-from-er-model-to-relational-model
 
Run
Id Name