Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CSE 880, Fall 2014 Advanced Database Systems Homework 7: Object Relational Implementation Due: 11/24/2014 This homework has to be implemented using Oracleplus Implement the following in oracle object-relational. 1. (20 Points) Following problem is on inheritance in Oracle object relational database. (a) Create the following three types in Oracle object-relational database. These types correspond to the entity sets given in the EER diagram of the sports database of homework 1. Employee-type(Eno, Ename, Eaddress) Player-type(PlayingPosition) InternationalPlayer-type(country) 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). Assume that InternationalPlayer-type is a subtype of Player-type. 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 of type Player-type and another two tuples of type InternationalPlayer-type. (c) Do the following query on the table Players: i. Select tuples of InternationalPlayer-type with only attributes of its super types. ii. Select tuples of InternationalPlayer-type with all of its attributes. iii. Select the attribute name and the country of the tuples of InternationalPlayer-type. 1 iv. Retrieve all rows of Players table as one column of object type player-type v. Retrieve all rows of Players table as a non-object-relational multi-column (each attribute is a column) table. 2. (10 points) Object-relational schema in Oracle of some of the entity and relationship types of the sports-database (EER diagram posted) is given. You will need to complete this schema for the EER diagram posted. 3. Design and implement a query which uses REFs to go accross tables instead of joins to navigate across tables. 4. (20 Points) Two member functions (getWinner, getMaxScore) are needed to implement the following SQL queries. The member function getWinner and the interface to getMaxScore member function are given in object-relational schema file. You need to implement the getMaxScore member function. 5. (30 points) Implement the following SQL queries: (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. 2