Question: Question 1 (6 points): Consider a Digital Games database with the following relations and attributes: The database has information about registered gamers as well as
Question 1 (6 points): Consider a "Digital Games" database with the following relations and attributes: The database has information about registered gamers as well as their favorite games and their ranks. For simplicity, let us assume that the database stores only one favorite game per gamer. This database also has information about famous digital games, the stores that sell them, and the price of each game. Each store sells many games, and copies of a single game can be sold in different stores. The whereToFind relation captures such a many-to-many relationship. GameID and S hopID in WhereToFind relation are foreign keys referencing the primary keys of the Game and Shop relations, respectively. FavoriteGame in the Gamers relation is a foreign key referencing the primary keys of the Game relation. Each game can fall within several categories (e.g., sports, action), stored in the Category relation. GamelD in Category relation is a foreign key referencing the primary key of the Game. From the relational schemas illustrated above, use the different relational algebra operators and operations (,,,,U,, , ) discussed in class to build the following queries: 1. (0.5 points) List -by name and ID- each gamer who lives in Chicago, with a rank of 5 , and is aged between 15 (included) and 30 (included). 2. (0.5 points) List games -by name and release year- that are not in the "Action" category. 3. (0.5 points) Since each game can fall within several categories, list games -by name and release year- that are in the "Action" category and also in the "Role-Playing" category. 4. ( 0.5 points) Display stores -by name- located in Chicago or Seattle and sell a specific game with a game ID of 67782. 5. (0.5 points) Display games -by name- sold by stores with a price range between 20$ (included) to 100S (included). 6. (0.5 points) List gamers -by name- whose favorite games are either "Call of Duty" or "FIFA". Call of Duty and FIFA are names for games, not IDs. 7. (1 point) For each possible game, list the name and category of the game as well as the name and address of the store selling it. Name the result as "Full_Info", 8. (1 point) List stores -by name and address- that sell games from the "action" category, not from the "sports" category. 9. (1 point) Display stores -by name- that sell a game named "NBA" for less than 805 (included). NBA is the name of the game, not the game's ID. Name the result as "WhereToFind NBA
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
