1 / 24

CONCEPTS OF E-R MODEL

CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints. Entity

Télécharger la présentation

CONCEPTS OF E-R MODEL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CONCEPTS OF E-R MODEL

  2. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints

  3. Entity An entity is a person, place, thing, event or concept about which information is stored in database. e.g. student, supplier, part, car, bank, university, some deal, some event etc. Types of Entity : Entities are of two types : • Tangible Entity • Intangible Entity

  4. Entity Contd.. Tangible Entity : An entity which has physical existance is called tangible entity. e.g. parts, supplier etc. Intangible Entity : It is onewhich does not exist physically. e.g. Some deal, some event etc.

  5. Attributes Attribute gives the characteristics of the entity. e.g. Attributes of a student can be Roll No., Name, Class etc. The attributes of a car can be Regn. No., Color, Model etc. An attribute is also called data elements or field or data item.

  6. Attributes Contd.. Types of Attributes : Single valued and multi valued attributes: An attribute which have a single value for particular entity is known as single valued attributes. For example age of employee. An attribute which have a set of values for the same entity is known as multi valued attributes. For example colors for a car.

  7. Attributes Contd.. Composite versus Simple attributes: The attributes which can be divided into smaller independent attribute called composite attributes. For example address of the employee entity can be divided into house no, city, state, pin etc. The attributes which can not be divided into smaller subparts are called simple or atomic attributes. For example age of employee entity. Data Value A data value is actual data or information contained in each data element.

  8. Attributes Contd.. Stored verses Derived attributes: An attribute which can be derived from another attributes is known as derived attribute. For example age of an employee can be determined from the today’s date and Birthdate. Complex attributes: If an attribute for an entity is built using composite and multi valued attributes, such as attributes is called complex attributes.

  9. Attributes Contd.. For example, If a person can have more than one residence and each residence can have multiple phones, an attribute addressphone for a person entity can be specified as: {addressphhone (phone {(area code, phone number)}, address(selector address(selector number, house number), city, state, pin))} Here {} are used to enclose multivalued attributes and () are used to enclose composite attributes with comma separating individual attributes

  10. Attributes Contd.. For example, If a person can have more than one residence and each residence can have multiple phones, an attribute addressphone for a person entity can be specified as: {addressphhone (phone {(area code, phone number)}, address(selector address(selector number, house number), city, state, pin))} Here {} are used to enclose multivalued attributes and () are used to enclose composite attributes with comma separating individual attributes

  11. Data Value It is actual data or information contained in each attribute. e.g. Roll No. can take value 20121050001. Null Value : An attribute has null value if either the value of an attribute is not known or not applicable to that entity. e.g. if a person does not have any degree then college degree attribute value will be null.

  12. Entity Types ENTITY TYPE : EMPLOYEE Attributes An entity type is defined as a collection of entities that have the same attributes. For example employee in a company database. The employee entities share the same attributes, but such entity has its own value for each attributes Name Age Pay E1 (Amit 40 10000) E2 (Sunil 40 10000) ……………… ……………….

  13. Entity Types Contd.. An entity type is represented in ER diagram as a rectangular box enclosing the entity type name. Attribute name is enclosed in ovals and are attached to their entity type by straight lines as shown in following figure: Age Pay Name Employee

  14. Types of Entity Types Weak Entity type: An entity type that do not have any key attribute is called weak entity-type. The weak entity type is also called the child entity type or the subordinate entity type. Following symbol is used for weak entity type:

  15. Types of Entity Types Contd.. For example: Sex Age Name

  16. Types of Entity Types Contd.. Strong Entity type: Entity that have key attribute are called strong entity type. The strong entity type is also called regular entity type. For Example: Name Sex Age Roll Student

  17. Relationships Relationships which connect entities and represent meaningful dependencies between them. The way in which two or more entity types are related is called relation type. In ER diagram, relationship types are represented by diamond shaped box.

  18. Relationship Constraints There are two types of relationship constraints. • Participation Constraints • Cardinality Ratio Participation Constraints: It specifies whether the existence of an entity depends on another entity via the relationship type. Total Participation: In total participation every entity in entity set must be depend on another entity.

  19. Relationship Constraints Contd.. Partial Participation: In partial participation, some entities in entity set are depend on another entity. Cardinality Ratio : Cardinality ratio for a binary relationship specifies the number of relationship instances that an entity can participate in a relation set. There are four types of cardinality ratios.

  20. Relationship Constraints Contd.. One to one (1:1) : The relationship between a Department and a Manager is usually one-to-one as shown in figure: Department Manager

  21. Relationship Constraints Contd.. One to many (1:N): The relationship between manager and employee is one-to-many, because there are several employees reporting to the manager as shown in following figure: Manager Employee

  22. Relationship Constraints Contd.. Many to one(N:1): The relationship between Dependent and employee is many to one as shown in following figure: Dependent Employee

  23. Relationship Constraints Contd.. Many to many(M : N) : The relationship between Employee and Project is many to many as shown in following figure: Employee Project

  24. THANKS

More Related