A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 2, Problem 5TD

Explanation of Solution

Tables in the TAL Distributors database:

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...

Blurred answer
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
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
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
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage