

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(a) Create the following three types in Oracle object-relational database. These types correspond to the entity sets given in the EER dia- gram of the sports database. Employee-type(Eno, Ename, Eaddress) Player-type(PlayingPosition) Playing-coach-type(YrsExperience) Assume that Employee-type is NOT INSTANTIABLE (note that a method can also be defined as NOT INSTANTIABLE where only interface of the method is defined with the type definition and the implementations of the method are created in the subtypes). Further assume that Playing-coach-type is a subtype of ONLY Player-type (Oracle does not support multiple inheritance). Do not forget to include NOT FINAL in Employee-type and Player- type. (b) Create a table Players of Player-type. Insert into this table two tuples, one of type Player-type and the other of type Playing- coach-type. (c) Redefine the type to prevent inserting tuples of Playing-coach-type into the table Players. (d) Indicate if tuples of Player-type can be inserted into a table of Playing-coach-type.
complete this schema for the modified EER diagram of homework 1, also posted. NOTE ABOUT THE SCHEMA GIVEN: In object-relational data model an attribute can be defined as a table type, called nested relations. This is one way of defining a set type at- tribute in Oracle. One problem of nested relations is that the resulting tables are not in 3rd Normal form, creating a serious update problem due to replication. One way of handling this problem is to use refer- ences to the tuples being replicated instead of replicating the actual tuple.
(a) Get the names of those teams which have players with address ’East Lansing’ (b) Get the name of each game and the players who have scored the highest in that game. (c) Get all the teams in League A who have not won any games.