1. Engineering
  2. Computer Science
  3. for this database write sql statements to provide the following...

Question: for this database write sql statements to provide the following...

Question details

For this database, write SQL statements to provide the following information for the output specified:

  • Employee information (e.g., employee name, address, phone number, hiring date, salary, etc.)
  • Information about the books and CDs in the bookstore (e.g., title, author, price, etc.)
  • Sales of CDs and books, searchable by date
  • Current inventory status of books and CDs

SQL Tables: PRODUCTIDTITLE 421 422 423 424 PRICE NUMBERAVAILABLE Looking Bill Jones Rooking Mill Jones Booking Fill Jones Tooking Pill Jones wooking Till Jones9 1e 425 EMPLOYEEID ADDRESS PHONE NUMBER SALARY HIRE DATE Ted Thorn 413 Maple Street 8675409 Red Thorn 414 Maple Street 8675509 Bed Thorn 415 Maple Street 8675609 Ced Thorn 416 Maple Street 8675709 Med Thorn 417 Maple Street 8675809 89899 88-NOV-90 89890 e8-NOV-91 89800 8900 e8-NOV-93 8800e8 08-NOV-92 88-NOV-94 PRODUCTIDTITLE 421 422 423 424 PRICE NUMBERAVAILABLE Looking Bill Jones Rooking Mill Jones Booking Fill Jones Tooking Pill Jones Wooking Till Jones 9 1e 425 TRANSACTIONID EMPLOYEEID PRODUCTID TIME OF PURCHASE TRANSACTION TOTAL 321 322 323 324 325 421 422 423 424 0830 1e 850 12 425

SOL Code: CREATE TABLE Employees ( EroploxeeD NUMBER PRIMARY KEY Name VARCHAR2(15) NOT NULL, Address VARCHAR(20), Phone Number NUMBER 10), Salary NUMBER(6), INSERT INTO Employees VALUUES001, Ted Thom,413 Maple Street, 3675409,89899,TO DATEC1108/90,MMDD YYYY); INSERT INTO Employees VALUESC02, Red Thom,414 Maple Street,8675509,89890,TO DATE 1108/91MMDD/YYYY); INSERT INTO Employees VALUESÇ03,Bed Thom,415 Maple Street, 8675609,89800,TO DATE(1108/92,MMDD YYYY)); INSERT INTO Employees VALUES04, Ced Thom,416 Maple Street,8675709, 89000,TO DATEC11/08/93,MMDD YYYY) INSERT INTO Employees VALUESCOS, Med Thorn,417 Maple Street,8675809,80000,TO DATEC11 08/94,MMDD YYYY) RAR DATE CREATE TABLE Books ProductDNUMBER(5) PRIMARY KEY, Title VARCHAR(20) Author VARCHAR20), Price NUMBER(10), INSERT INTO Books VALUESC421,Looking,Bill Jones,8.99,10) INSERT INTO Books VALLESC422,Rooking,Mill Jones,8.909); INSERT ΝΤΟ Books VALUESC423,Booking,Fill Jones,898.8); INSERT INTO Books VALUESC424, Tooking,Pill Jones,8.97,7), INSERT INTO Books VALUESC425,Wooking,Till Jones,8.96,6; INSERT INTO Inventory VALUESC421,Looking, Bill Jones, 3.99,10); INSERT INTO Inventory VALUES(422,Rooking,Mill Jones,8.90.9); INSERT INTO Inventory VALUES423,Booking,Fill Jones,8.98,8; INSERT INTO Inventory VALUESC424,Tooking,Pill Jones,8.97,7); INSERT INTO Inventory VALUESC425,Wooking, Till Jones,8.96,6); CREATE TABLE Inventory C PredutID NUMBER (3) CONSTRAINT hprustid Title VARCHAR(10) Author VARCHAR(20), Price NUMBER 10), INSERT INTO Purchases VALUESC321,01,421,0300,9.35); INSERT NTO Purchases VALUES(322,02,422,0830,10.33% INSERT INTO Purchases VALUESC323,03,423,0340,1132); INSERT INTO Purchases VALUESC324,04424,0850,12.45) INSERT INTO Purchases VALUESC 325,05.425.0900,22.43); SELECT FROM Employees; CREATE TABLE PurchasesC TransactionD NUMBER(5) PRIMARY KEY, EmployedDNUMBER(S) CONSTRAINT kasad REFERENCES Employees(EmplosesD. ProductID NUMBER(5) CONSTRAINT k pid REFERENCES BooksProductID) SELECT FROM Books; SELECT FROMInventory; SELECT* FROM Purchases;

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution