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
Question
Question 1. Write the SQL query to create the table structures for the entities shown in Figure1
ER-Diagram. The structure should contain the attributes specified in Figure1. Use data types that
are appropriate for the data that will need to be stored in each attribute. Enforce primary key and
foreign key constraints as indicated by the diagram.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
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
- Indicate the changes (using the shorthand representation) that you would need to make to the original KimTay Pet Supplies database design to support the following requirements. There is no relationship between customers and sales reps. When a customer places an order, any sales rep can process the order and create the invoice. On the invoice, you need to identify both the customer placing the order and the sales rep responsible for the invoice. Draw an E-R diagram for the new design.arrow_forwardJust answer question 5. I included the table for itarrow_forwardDATASBEarrow_forward
- 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_forward6. You have been asked to store five attributes that poses the following analytical data types into a SQL Server relational data store. Identify and explain the data-type that you would select for each respective column when designing a table/relation that will house those five data attributes (assume that the order of the columns in the table will match the order of the data attributes listed below): 1. Interval attribute whose values are presented as textual data 2. Ordinal Attribute whose values are presented as numeric data 3. Ratio Attribute whose values are presented as numeric data 4. Nominal Attribute whose values are presented as textual data No hand written and fast answer with explanationarrow_forwardSQL Queries: Given the following schema. Primary keys are underlined and highlighted in yellow and foreign keys are bold. The meaning of the relations is straightforward. Medical_Staff(MS_Id, MS_First, MS_Last, MS_PhoneNumber, MS_Occupation, Salary) Blood_Bank(Bank_Id, Bank_Name, Bank_Street, Bank_City, Bank_St, Bank_PhoneNumber) Donor(Donor_Id, Donor_First, Donor_Last, Donor_BloodType, Donor_City, Donor_St, DOB, TotalNumberOfDonations) Donation_Record(Donor_Id, Donation_Date, Donation_Amount) Employee(MS_Id, Bank_Id) Storage(Donor_Id, Donation_Date, Bank_Id) Write SQL queries to answer the following questions: a.Find the average donation amount for Sue Thompson (Donor Id = 3329) for the year 2018. b.Sum all donations by Bank for each State (i.e. the State the blood bank is located in, not the Donor). c.Find the name of the youngest donor and all the donations made in by that donor in 2020.arrow_forward
- Based on the following ER model and business rules, write an SQL statement to create COURSE and COURSE_PREREQ table. Be sure to implement all related data integrity constraint. For each column, use the data type as you think appropriate. Business rule • A course may have more than one prerequisites. The prerequisite courses may have their own prerequisite courses (more than one). COUSE entity • CourseNo is a UID (unique identifier). • Credit hours should be greater than 0 and less than 7. COURSE_PREREQ entity • UID is the composite of CourseNo and CourseNo (i.e., prerequisite courseNo). COURSE COURSE_PREREQ CourseNo: UID Title Description CourseNo: LCourseNo: UID CreditHoursarrow_forwardDiscuss all aspects of database design. Discuss the diagrams used, the steps involved in the design and the design considerations.Your answer should be about 3 paragraphs.arrow_forwardInstructions In SQL Server, create a new database called University. Given the ERD in this document, write the CREATE TABLE statements to construct the tables for this database. Be sure to use reasonable data types and create all tables, attributes, primary keys, foreign keys, and “not null” constraints in your statements where appropriate. To receive full credit for this assignment, your CREATE TABLE statements must be executed in SQL Server. In a new Word document, copy the ERD and type your CREATE TABLE statements below the ERD. Then, in SQL Server, after you execute each CREATE TABLE statement, issue these two statements: SELECT * FROM [table name] exec sp_help [table name].arrow_forward
- Complete a database design for both the Invoice_printed and Real Estate Agent Listings problems / cases. Display your normalized tables as as demonstrated in the following format: TABLENAME(Field 1 (pk), Field 2, Field 3........)arrow_forwardQUESTION 3 When identifying Tables in a query, you should All of these Identify the Server Instance None of these Identify the schema Identify the Set Theoryarrow_forwardJust answer question 10. I included the tablearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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