ITEC 3220 Lecture Notes - Lecture 1: Subtyping
Document Summary
In this assignment, there is 2 components, logical design sql query, will get experience debugging when doing oracle. Assuming we already made sponsor and tract table then we make the donation table: Create table donation_m(donid char(5), amount number(7,2), ddate date, sid char(5), tractid. Char(3), primary key(donid), foreign key(sid) references sponsor, foreign key(tractid) At this point we can make table department. Then we will move to building, assuming tract is created. Building participates many to many relationship to employee, it means that we have to create separate tables, we don"t not add fk employee references to . , Then we come to unit, it"s a weak entity set, the rule is we keep pk as identifying owner then we use. Fk of unit table will be building but need to add on delete case because its weak entity set. Unit is a supertype with subtypes of apartment and townhouse. Pk for the unit table is unitid and b_name from building table.