Post your solutions to the Oct 16 In-Class Exercise to this thread.
Best,
Chris
Ex1.) An ER of Car where it contains the attributes car_id (key) and name and Part with attributes part_id (key) and name where there exist a relationship For between Car and Part. Where the a Part only fits if it is for a Car. In this case the Part would be a weak entity set.
Ex2.) An ER of Bike where it contains the attributes bike_id (key) and name and Part with attributes part_id (key) and name where there exist a relationship For between Bike and Part. Where the a Part only fits if it is for a Bike. In this case the Part would be a weak entity set.
(Edited: 2019-10-16)An ER of Boat and Part where there exist a relationship For between Boat and Part. Where the Part only fits if it is for a Boat. In this case the Part would be a weak entity set.
(Edited: 2019-10-16)Classroom is an example of a weak entity as it cannot exist without a Building. Another example might be from our midterm as Dependents cannot exist without Employees
The first example could be a Room in a Hotel. We can only get a room when we know the hotel.
The second example is when Owners(name, address) signs Contract with Contractors(name, address) to build Buildings(name, location).
(Edited: 2019-10-16)For example, in an HR system, an employee's info was stored. It also stored their Emergency contacts. It depends on the employees. an emergency contact would be weak entity sets.
(Edited: 2019-10-16)Example 1:
A room number cannot identify an room without the building name, so a room is a weak entity set
Example 2:
A Product(id, price) and customer(name, address), is necessary to create an invoice(product, customer)
-We have relations: Class, Instructor, Semester and AverageGrade. The key for AverageGrade entity set comes from combining the keys of Class, Instructor and Semester (name of the class, name of instructor and the semester of the class).