COP5725 Database Systems
ER Chapter 4
The University of West Florida
Dre Dyson
Table of Contents
Checkpoint 4.1
Checkpoint 4.2
Checkpoint 4.3
Exercise 4.2
Checkpoint 4.1
1: Of the following items, determine which could be an entity and state why: automobile, college class, student, name of student, book title, number of dependents.
a. Generally, entities are person’s, places, or things. So in this case, automobile, college class, student, and book title are entities. Whereas name of student and number of dependents describes a person, place, or thing.
4: Why do we need entity-relationship diagrams?
a. Entity-relationship diagrams allow us to visualize the schema and/or structure of a database. We also need it to understand the foundation of a particular database, which will allow others to reverse engineer the database.
5: What are attributes? List attributes of the entities you found in question 1?
a. Attributions describe an entity. In other words, an attribution describes a person, place, or thing. In terms of question 1, the following are attributes: ‘name of student’, ‘number of dependents’.
6: What is a relationship?
a. A relationship is the link or association between entities within a database.
Checkpoint 4.2
1. Describe the basic types of data representation schemas used in ER modeling.
a. The basic types of data representation schemas used in ER Modeling are Entity, Relationship, and Attributes. Here entities are the person, place, or thing. Relationship is the link between each entity within a database, and Attributions describe a particular entity.
2. What notation is used to diagrammatically show an entity in the Chen-like ER model?
a. Entities are shown by rectangles within a Chen-like ER Model
3. How do we diagrammatically show attributes in the Chen-like ER model?
a. Attributes are shown by ovals with a Chen-Like ER Model
4. How do we show composite attributes in the Chen-like ER model?
a. Composite attributes are shown by groups linked to a particular attribute.
5. Draw an entity representation for the entity BUILDING with the following attributes: building name, occupancy, and whether or not it has an elevator (yes/no).
a.
6. Embellish the BUILDING entity to include the building super-intendent’s name (first, middle, and last). Does this have to be a composite attribute? Why or why not?
a.
Yea, this does a composite attributing. This is because we listed the building’s super-intendent’s full name as ‘fname’, ‘mName’, and ‘lName’.
7. Embellish the BUILDING entity to include the address of the building, which will be the primary key.
a.
8. Again, embellish the BUILDING entity to include names (and only names) of the janitorial staff.
a.
9. Add a multivalued attribute to the BUILDING entity.
a.
10. How many attributes can an entity have?
a. Many
Checkpoint 4.3
1. How do you map multivalued attributes?
a. To map multivalued attributes, you will first form a separate table. Then you record a row for each value of the multivalued attribute by the key from the original table. Next, you will add a new table with the multivalued attributes. Lastly, you will remove the multivalued attribute from the original table (Bagui & Earp, 2023)
2. How do you map composite attributes?
a. To map composite attributes, you will first map the entities and form columns of each elementary part of the composite attributes.
3. What is a unique identifier? Is it a candidate key? Is it “the” primary key? Discuss.
a. A unique identifier is a general key used for every record within a database. A candidate key is a key that establishes a relationship between entities and/or attributes. A primary key is a key used as a reference between other tables within a database.
Exercise 4.2
You want to create a database about the books on your shelf. Each book has authors (only the last name is needed), title, publisher, courses used in (course number only). Draw the ER diagram using the Chen-like model, and then write the English description for your diagrams. Compare the English to your diagrams and state any assumptions you made when drawing the diagrams.
Which attributes would you consider composite attributes in this database? Which attributes would you consider multivalued attributes in this database? Could there be any derived attributes? What would be good keys? Map your diagram to a relational database.
Book on bookshelf: The books on my shelf
Title: The title of the book
Publisher: The publisher of the book
Author: The author of the book
lName: The last name of the author
Course: The course used for the book
cNumber: The course number
In this case, I would not consider any attributes as composite attributes. This is mainly because the requirements of the database is limited, and there are very few items within our database. In terms of multivalued attributes, lName could be a possible multivalued attribute. This is because there could be one or more authors for one book. Further, a good key would be title, because all title is arbitrarily unique.
