A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 2, Problem 5TD
Explanation of Solution
Tables in the TAL Distributors
The TAL Distributors database consists of the following tables:
- REP(REP_NUM, LAST_NAME, FIRST_NAME, STREET, CITY, STATE, POSTAL_CODE, COMMISSION, RATE)
- CUSTOMER (CUSTOMER_NUM, CUSTOMER_NAME,STREET, CITY, STATE, POSTAL_CODE, BALANCE, CREDIT_LIMIT)
- ORDERS (ORDER_NUM, ORDER_DATE, CUSTOMER_NUM, REP_NUM)
- ORDER_LINE (ITEM_NUM, ORDER_NUM, NUM_ORDERED, QUOTED_PRICE)
- ITEM (ITEM_NUM, DESCRIPTION, ON_HAND, CATEGORY, STOREHOUSE, PRICE)
Here, there exist mainly five tables namely the “REP”, “CUSTOMER”, “ITEM”, “ORDERS”, and “ORDER_LINE” with the respective data. The primary keys for the table “ORDER_LINE” are been listed or use “ITEM_NUM”, “ORDER_NUM” as per requirements...
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Indicate the changes you need to make to the KimTay Pet Supplies database to support the following additional requirement. Each location has a manager who is identified by a manager ID, a manager first name, and a manager last name.
The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.
based of the image, write a sql statement that shows the total number of patients handle by each nurse. sort the result based on the nurse's ID and display the nurse's name too
Chapter 2 Solutions
A Guide to SQL
Ch. 2 - Prob. 1RQCh. 2 - What is an attribute?Ch. 2 - What is a relationship? What is a one-to-many...Ch. 2 - Prob. 4RQCh. 2 - What is a relation?Ch. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - How do you qualify the name of a field, and when...Ch. 2 - Prob. 9RQCh. 2 - What is a primary key? What is the primary key for...
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Define second normal form. What types of problems...Ch. 2 - Define third normal form. What types of problems...Ch. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - List the changes you would need to make to your...Ch. 2 - Prob. 1TDCh. 2 - Prob. 2TDCh. 2 - Prob. 3TDCh. 2 - Prob. 4TDCh. 2 - Prob. 5TDCh. 2 - Prob. 1CATCh. 2 - Identify the functional dependencies in the...Ch. 2 - Prob. 3CATCh. 2 - Determine the functional dependencies that exist...Ch. 2 - Prob. 2SCGCh. 2 - Prob. 3SCG
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
- Based on the ERD below, write the SQL statement to change the job description of “Database Designer” to “Database Developer”. After completing this task examine the results with a select statement. (Hint: Use an Update Statement.)arrow_forwardQuery design by referring the following scenario.Scenariocompany has a huge database to handle their employees’ details.Most of the details regarding the employee activities and department details are stored in Employeestable and Departments table. Write the appropriate query to support the manager to complete thefollowing:arrow_forwardCreate access table relationships as shown in the ERD above.arrow_forward
- In a complex join, how is the number of tables you wish to join related to the number of WHERE conditions?arrow_forwardDATABASEarrow_forwardAnswer the given question with a proper explanation and step-by-step solution. In Design View of the DirectorSeptember query, add criteria using wildcard characters to select all records with Director anywhere in the JobTitle field and an ApplicationDate greater than or equal to 9/1/2018. Run the query to display it in Datasheet View as shown in Figure 3, and then save and close it.arrow_forward
- Task 6: The Car Maintenance team considered that the available maintenance tasks should also have the price information in the database. Alter the MAINTENANCE_TYPES table to include a new column named MAINTENANCE_PRICE of type FLOAT. Alter the MAINTENANCE_TYPES table to include pricing information.arrow_forwardI'm wondering how to start this assignment? Instructions 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]. Note: exec sp_help [table name] is a built-in stored procedure that you run to easily see your table structure, including fieldnames, data types, primary keys, foreign key constraints, etc. It’s a very useful tool. Take a screen shot of your queries and their…arrow_forwardhow is the ProductID field in the Product table specified to be required? Why is it a required attribute?arrow_forward
- Create a new table named PRODUCT. The product table will have two attributes; product ID as integer, not null, and a primary key constraint set to unique. product description as varchar(30), not null specification. I am not sure how to do a primary key contraint set to unique. I believe I did the first two correct.arrow_forwardThe property management team wants to ensure that the property and owner information always correspond. In other words, they do not want any property in the database where the OWNER_NUM information does not match with anyone in the OWNER table. You need to alter the PROPERTY table by changing the OWNER_NUM field to refer to the OWNER table. Alter the PROPERTY table by changing the OWNER_NUM field to refer to the OWNER table.arrow_forwardaccess databases Normalization Exercise Represent this table as a collection of tables in 3NF: Student (StudentNumber, StudentName, NumberCredits, AdvisorNumber, AdvisorName, CourseNumber, CourseDescription, Grade)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage