Diamonds and ovals are replaced squared brackets
logical structure of a database. In an ERD, each entity set is represented by a rectangle, each relationship set is represented by a diamond and is connected to associated entity sets by lines, and each attribute is represented by an oval.
si | sid | s-name | major | Take | c-id | ||
---|---|---|---|---|---|---|---|
|
Course |
|
Although the ER approach seems to be simple, there are a lot of design issues to be considered. For example, we should decide which "things" should be treated as entity sets. Other issues should be considered including which attributes should go to the "student" entity set, which should go to the relationship set "takes," etc.
© 2000 by CRC Press LLC
The function that an entity plays in a relationship is called that entity's role. For example, a graduate student can play the role of either a student as well as an instructor.
Both entity sets and relationship sets are described by attributes. There are different kinds of attributes, such as simple versus composite attributes, single-valued versus multivalued attributes, null attributes and derived attributes (such as age being derived by data of birth and today's date). The collection of attributes is referred to as the schema (as we already discussed earlier in this chapter).
structures level, and are also different to each other.
♦Superkey: It uniquely identifies an entity in the entity set.