Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
ERD and Keys
A hotel has many rooms. A guest can make a reservation for one room or multiple rooms. A reservation is associated with only one guest. Draw an ERD with the relationships and resolve any many to many relationships. Create an ID for each entity you create (for example RoomID, GuestID, Reservation ID) as the Primary Key. Identify any foreign keys in each entity where appropriate.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Implement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…arrow_forwardThe value range of an attribute must be large enough for the index to be relevant. Except for this one use case, an index is never helpful.arrow_forwardWhat three situations make it necessary to make a substitute key instead of the main key of a relation?arrow_forward
- how to Create three or more SQL Data Control Language (DCL) Statements using the Homework Database: EMPLOYEE, STORE, REGION, and SUPPLIER Database. Create a new user statement for the database. The user name should be based on yourself containing your name. Statements that grant privileges to the new user. Statements granting privileges to at least 2 of the tables in the assigned database Statements that revoke privileges to the new user. Statements revoking privileges to at least 2 of the tables in the assigned Database the home work data base: -- creating the RegionStore DataBase DROP DATABASE IF EXISTS RegionStore; CREATE DATABASE RegionStore; USE RegionStore; -- creating the Region table CREATE TABLE Region ( regionID VARCHAR(10), regionName VARCHAR(50), supervisor VARCHAR(50), CONSTRAINT PRIMARY KEY (regionID) ); -- creating the store table CREATE TABLE Store ( storeID VARCHAR (10), storeAddress VARCHAR (50), phone…arrow_forwardWhich of the following defines a relationship in which each occurrence of data in one entity is represented by multiple occurrences of the data in the other entity?a. one-to-oneb. one-to-manyc. many-to-manyd. none of the abovearrow_forwardScenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and…arrow_forward
- Each relationship is mapped into a relation? true or falsearrow_forwardWhich of the following defines a relationship in which each occurrence of data in one entity is represented by only one occurrence of data in the other entity?a. one-to-oneb. one-to-manyc. many-to-manyd. none of the abovearrow_forwardFor the below 'bank' schema: customer(customerid, username,fname, Ina me,street1,street2,city,state,zip) account(accountid, customerid, description,) transaction(transactionid,trantimestamp, acc ountid, amount) A customer may have several accounts, and each account may participate in many transactions. Each transaction will have at least two records, one deducting amount from an account, and one adding amount to an account (for a single transactionid, the sum of amounts will equal zero). Using SQL, answer this question (write a SQL query that answers this question): 8. List the top 1% of customers (ordered by total balance).arrow_forward
- Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and…arrow_forwardWhich of the following is NOT a property of a relation? Tick all that apply. [ ] Each cell in a relation cannot contain multiple values. [ ] Order of tuple is important. [ ] The name of a relation is unique. [ ] Values of an attribute from the same domain.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education