Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Attributes: Course (Course - Id, Title, Credits)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Attributes Amity School of Engineering & Technology

An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits) Domain the set of permitted values for each attribute Attribute types: Simple and composite attributes. Single-valued and multivalued attributes Example: multivalued attribute: phone_numbers Derived attributes Can be computed from other attributes Example: age, given date_of_birth

Amity School of Engineering & Technology

Composite Attributes

Amity School of Engineering & Technology

Mapping Cardinality Constraints


Express the number of entities to which another entity can be associated via a relationship set. Most useful in describing binary relationship sets. For a binary relationship set the mapping cardinality must be one of the following types: One to one One to many Many to one Many to many

Mapping Cardinalities Amity School of Engineering & Technology

One to one

One to many

Note: Some elements in A and B may not be mapped to any elements in the other set

Mapping Cardinalities Amity School of Engineering & Technology

Many to one

Many to many

Note: Some elements in A and B may not be mapped to any elements in the other set

Amity School of Engineering & Technology

Keys
A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity. A candidate key of an entity set is a minimal super key ID is candidate key of instructor course_id is candidate key of course Although several candidate keys may exist, one of the candidate keys is selected to be the primary key.

Amity School of Engineering & Technology

E-R Diagrams

Rectangles represent entity sets. Diamonds represent relationship sets.

Attributes listed inside entity rectangle


Underline indicates primary key attributes

Entity With Composite, Multivalued, and Derived Attributes


Amity School of Engineering & Technology

Amity School of Engineering & Technology

Relationship Sets with Attributes

Amity School of Engineering & Technology

Roles
Entity sets of a relationship need not be distinct Each occurrence of an entity set plays a role in the relationship The labels course_id and prereq_id are called roles.

You might also like