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
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 with 1 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
its not working, did you test the code?
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
its not working, did you test the code?
Solution
by Bartleby Expert
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
- Instructions: Write the suitable SQL statement to answer the following questions based on the following tables ( image )the question is:2. Get employee details from employee table whose first name starts with 'J', order the result descending.arrow_forwardI need help with the SQL query for the following question: 1. Get a list of 5 reviews for shoppers in Chicago Here is the information on the field names: The table name is: Reviews Review Form Fields Product/ModelName: Product/Category: Product/Price: Retailer/Name: Retailer/ZipCode: Retailer/City: Retailer/State: Product/On Sale: Manufacturer/Name: Manufacturer/Rebate: Review/UserId: Review/Rating: Review/Date: Review/Text: Example of Review Form Filled out ProductModelName: Galaxy S4 ProductCategory: Smart Phone ProductPrice: 499 RetailerName: Bestbuy RetailerZipCode: 44114 RetailerCity: Cleveland RetailerState: OH ProductOnSale: No ManufacturerName: Samsung ManufacturerRebate: No ReviewUserId: xmm473 ReviewRating: 3 ReviewDate: 6/10/2012 ReviewText: overheats after 2 hoursarrow_forwardWrite Create Table SQL statements based on the above ERD. All tables must have primary keys. All tables must have appropriate foreign key constraints. Foreign keys must have the same name, datatype and size of the primary key that they refer to The following columns datatypes and sizes must be used: bid,authid / number(4) title,sname,fname / varchar2(30) sellingprice, payrate / number(6,2) Table Column Type Range author sname & fname Unique book title Not Null book sellingprice Check not negative allocation payrate Check 1 to 79.99arrow_forward
- Write an SQL query to extract the answer directly.arrow_forwardwrite SQL statement to search for employees whose manager is specified by the txtEname boxarrow_forward1.What is the result when the following SQL query is executed on a table named products? Choose the most correct answer. SELECT AVG(Products)FROM Products; Group of answer choices The query results in an error because the is no AVG function None of the above The query results in an error be cause a column is not specified The query returns the average of the Products table 2. If the primary key in the Employee table is located in the "ID" column what is the maximum number of results the following SQL SELECT query will return? SELECT *FROM EmployeeWHERE ID = 15; Group of answer choices 2 1 3 Do not have enough information to determine the answer 0arrow_forward
- Write Create Table SQL statements Work Session table The table must have a primary key. The table must have appropriate foreign key constraints. Foreign keys must have the same name, datatype and size of the primary key that they refer to The following columns datatypes and sizes and named constraints must be used Column DataType Constraint WorkYear number(4) Range 2019 - 2020 WorkWeek number(2) Range 1-52 WorkHours number(4,2) Range 0.5 – 99.99 BID NUMBER(4) ,AUTHID NUMBER(4)arrow_forwardQuestions 2.arrow_forwardWrite SQL code to ensure that the BOOKING_STATUS will only allow the words confirmed, tentative, cancelled, or complete, with the date entered on BOOKING_STATUS_CHANGE_DATE changing to the date when the BOOKING_STATUS is changed. BOOKING BOOKING_ID F' PROPERTY_ID F' PROPERTY_UNIT_NUMBER F' GUEST_ID * BOOKING_STATUS * BOOKING_STATUS_CHANGE_DATE * BOOKING_START * BOOKING_END OTHER DETAILS NUMBER (10) NUMBER (10) CHAR (8 BYTE) NUMBER (10) VARCHAR2 (25 BYTE) DATE DATE DATE VARCHAR2 (100 BYTE) ΒOOKING_PΚ (BOOKING_ID) FK_BOOKING TO_GUEST (GUEST_ID) FK_BOOKING_TO_PROPERTY (PROPERTY_ID, PROPERTY_UNIT_NUMBER) BOOKING_PK (BOOKING_ID)arrow_forward
- Table name: Supplier Column Name Role Data Type Length Constraint supplierID Stores the ID of a supplier Number 10 Primary key supplierFName Stores the first name of a supplier Varchar2 30 Cannot be null supplierLName Stores the last Name of a supplier Varchar2 30 Cannot be null supplierDOB Stores the date of birth of a supplier Date - supplierNBPro Stores the number of products supplied by a supplier Number 3 Should be greater than 10 a. Write in SQL a statement that adds a new column named comapnyID of type char(5). This column should be defined as a foreign key that relates the table Supplier to the table Company b. Write in SQL a query that displays the ids of the suppliers who supply the highest number of products. c. Create a view named ‘SupplierDetails’ to hold all the details of suppliers whose last names start with ‘bait’ and who supply between 50 and 200 products.arrow_forward4. Write a SQL statement to create a view named 'Employees_Purchase which will contain First Name, Last name and Salary of employees who are working in the Purchasing department.arrow_forwardwrite sql statement to modify the position table in order to define a constraint to ensure that the column position receive only values salad rep or manager course heroarrow_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