29-06-2012, 03:22 PM
Enhanced ER-diagram
27F157AL5Enhanced_ER-diagram.ppt (Size: 1.28 MB / Downloads: 198)
RELATIONSHIPS
Example: A library database contains a listing of authors that have written books on various subjects (one author per book). It also contains information about libraries that carry books on various subjects.
Entity sets: authors, subjects, books, libraries
KEY
Entities and relationships are distinguishable using various keys
A key is a combination of one or more attributes, e.g., social-security number, combination of name and social-security number.
A superkey is a key defined either for an entity set or relationship set that uniquely identifies an entity, e.g., social-security number, phone number, combination of name and social-security number.
A candidate key is a minimal superkey that uniquely identifies either an entity or a relationship, e.g., social-security number, phone number.
A primary key is a candidate key that is chosen by the database designer to identify the entities of an entity set.
EXAMPLE
Employees of a large company, e.g., IBM, where an employee reports to a manager. The manager is also an employee who reports to another manager. This chain of command continues to the very top where the CEO is the only employee who is not reporting to a manager. Draw the ER diagram for this example.
Enhanced Entity-Relationship Model
Since 1980s there has been an increase in emergence of new database applications with more demanding requirements.
Basic concepts of ER modeling are not sufficient to represent requirements of newer, more complex applications.
Response is development of additional ‘semantic’ modeling concepts.