2019-10-15

Oct 16 In-Class Exercise Thread.

Post your solutions to the Oct 16 In-Class Exercise to this thread.
Best,
Chris
Post your solutions to the Oct 16 In-Class Exercise to this thread. Best, Chris

-- Oct 16 In-Class Exercise Thread
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)
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.

-- Oct 16 In-Class Exercise Thread
1.Resource Description for IMG_1143.jpg
2. 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)
1.((resource:IMG_1143.jpg|Resource Description for IMG_1143.jpg)) 2. 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.

-- Oct 16 In-Class Exercise Thread
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
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

-- Oct 16 In-Class Exercise Thread
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)
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).

-- Oct 16 In-Class Exercise Thread
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)
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.

-- Oct 16 In-Class Exercise Thread
Resource Description for inclass.png
((resource:inclass.png|Resource Description for inclass.png))

-- Oct 16 In-Class Exercise Thread
1. The house has number, but we can only know where the house is if we know which street it is on. 2. laptop has part. On the other hand, the part only fits if it is for a laptop.
1. The house has number, but we can only know where the house is if we know which street it is on. 2. laptop has part. On the other hand, the part only fits if it is for a laptop.

-- Oct 16 In-Class Exercise Thread
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)
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)

-- Oct 16 In-Class Exercise Thread
- Model and Make of a car. Model can't exist without Make.
-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).
- Model and Make of a car. Model can't exist without Make. -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).
[ Next ]
X