CS
Chapter03ERModel.pptx

For example the employee john smith the research

Info icon This preview shows pages 8–16. Sign up to view the full content.

For example the EMPLOYEE John Smith, the Research DEPARTMENT, the ProductX PROJECT Attributes are properties used to describe an entity. For example an EMPLOYEE entity may have the attributes Name, SSN, Address, Sex, BirthDate A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name='John Smith', SSN='123456789', Address ='731, Fondren, Houston, TX', Sex='M', BirthDate='09-JAN-55‘ Each attribute has a value set (or data type) associated with it – e.g. integer, string, date, enumerated type, … The Entity-Relationship Model 8
Image of page 8

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Types of Attributes Simple Each entity has a single atomic value for the attribute. For example, SSN or Sex. Composite The attribute may be composed of several components. For example: Address(Apt#, House#, Street, City, State, ZipCode, Country), or Name(FirstName, MiddleName, LastName). Composition may form a hierarchy where some components are themselves composite. Multi-valued An entity may have multiple values for that attribute. For example, Color of a CAR or PreviousDegrees of a STUDENT. Denoted as {Color} or {PreviousDegrees}. The Entity-Relationship Model 9
Image of page 9
Types of Attributes In general, composite and multi-valued attributes may be nested arbitrarily to any number of levels, although this is rare. For example, PreviousDegrees of a STUDENT is a composite multi- valued attribute denoted by {PreviousDegrees (College, Year, Degree, Field)} Multiple PreviousDegrees values can exist Each has four subcomponent attributes: College, Year, Degree, Field The Entity-Relationship Model 10
Image of page 10

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Example of a Composite Attribute The Entity-Relationship Model 11
Image of page 11
Entity Types and Key Attributes Entities with the same basic attributes are grouped or typed into an entity type. For example, the entity type EMPLOYEE and PROJECT. An attribute of an entity type for which each entity must have a unique value is called a key attribute of the entity type. For example, SSN of EMPLOYEE. The Entity-Relationship Model 12
Image of page 12

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Entity Types and Key Attributes A key attribute may be composite. VehicleTagNumber is a key of the CAR entity type with components (Number, State). An entity type may have more than one key. The CAR entity type may have two keys: VehicleIdentificationNumber (popularly called VIN) VehicleTagNumber (Number, State), aka license plate number. Each key is underlined (Note: this is different from the relational schema where only one “primary key is underlined). The Entity-Relationship Model 13
Image of page 13
Entity Type CAR with two keys and a corresponding Entity Set The Entity-Relationship Model 14
Image of page 14

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Entity Set Each entity type will have a collection of entities stored in the database Called the entity set or sometimes entity collection Previous slide shows three CAR entity instances in the entity set for CAR Same name (CAR) used to refer to both the entity type and the entity set However, entity type and entity set may be given different names Entity set is the current state of the entities of that type that are stored in the database The Entity-Relationship Model 15
Image of page 15
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • SUNANHAN
  • Entity-relationship model, ER Diagrams

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern