Assignment Lab 2-3
1. What is an entity?
* An entity is something about which we want to keep data. There are physical entities; something physical in our universe (e.g., a person, place, thing, etc.). There is also a logical entity; something non-physical (e.g., a relationship).Three examples of an entity could be a gun, Airline, and a camera.
2. What is a relationship?
* A relationship is a logical connection between records from two or more tables. All relationships can be categorized as one-to-one, one-to-many, or many-to-many. An example of a one-to-many relationship would be a pet store owner and the pets. The Pet Store owner ...view middle of the document...
3. What is an attribute?
* An attribute is a property or characteristic of an entity. Three entities and their attributes are (A) gun (make, model), (B) airline (name, model), and (C) A camera (make, type).
3. What column or columns should be selected as the primary key to best meet the desired properties for a primary key in exhibit 2-17?
* I chose the column labeled student id as having the best properties for being a primary key. I also chose student id because there is a zero probability of that number being issued to, or duplicated by another student. All of the other candidate keys could either be replicated or shared.
4. In the ER diagram in Exhibit 2-18 identify the foreign key.
* In the ER diagram in Exhibit 2-18, I identified the Instructor ‘id’ as the primary key. The id is highly unlikely to be assigned to more than one instructor making it unique to the instructor. The foreign key found in the ‘course’ ER diagram (child) matches the the primary key in the ‘Instructor’ ER diagram (parent).
5. In the two tables in Exhibit 2-19, identify an entity integrity violation and a referential integrity violation.
* In the two tables in Exhibit 2-19 there is an integrity violation in the entity diagram for student. There are two separate students sharing the same student id# ; a primary key has to be a unique identifier and cannot be shared by another attribute
* There is a referential integrity violation in the entity diagram named ‘enrollment’. There is a student$id referenced for student 666 which is not referenced in the parent diagram ‘student’.