
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
You have been given the following specifications of a simple
Give the SQL to create the Session table. You may assume that the Trainer and Customer tables have already been created, and that the TrainerID and CustomerID columns are of the data type VARCHAR2(10). The status of the Session refers to the current state of the Session and can only be Active or Dropped

Transcribed Image Text:Trainer
TrainerID (PK)
First Name
Last Name
Address
Phone
Date OfBirth
SessionID (FK)
+H
Session
SessionID (PK)
Session Name
Room Name
Date Started
Status
LeadTrainerID (FK)
CustomerID (FK)
+H
Customer
CustomerID (PK)
Name
Address
ContactPhone
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 3 steps with 1 images

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
- The following relations are part of a general store database: customer(custnum, custname, city, creditlimit) orders(ordernum, orderdate, filled, custnum) orderline(ordernum, productnum, quantity, salesprice) product(productnum, descr, producttype, msrp, onhand) Here is a sample data (assume there are more records)Using PROJECT, SELECT and JOIN, write the sequence of operations to answer each of the following questions: 1a. What are the names and customer numbers of customers who are from Mississauga? 1b.What are the names of products (descry) and product types of products purchased by customers from brapton?arrow_forwardIn anticipation of a change to the database, you are asked to provide a list of all products that have 'Man-Made' or 'Man Made' in the the composition text. (HInt: It is easiest to use LIKE in this instance.) In addition, you are requested to replace either 'Man-Made' or 'Man Made' with the word 'Synthetic'. Only include ProductIDs between 1050 and 1060. Show the following in your answer: ProductID, ProductName, Composition, and the modified composition field as 'NewComposition'. (HINT: This problem is a little tricky because you need to replace both 'Man-Made' and 'Man Made'. The way to do this is to use a replace within a replace.)arrow_forwardPrepare a MySQL script that creates your database, tables, and inserts a small sampling of madeupdata. Test it out in MySQL before submission For the below diagram write the SQL queriesarrow_forward
- I would like to create a function to sum up total order amount within the date range, but i don't know how to write the right query. The query below is for counting the total orders, but I want to change to sum up total order amount. The Database table is attached. Please assist. ************************************** USE SQLBook; DROP FUNCTION IF EXISTS GetDateRangewithordersAmountGO CREATE FUNCTION GetDateRangewithordersAmount( @startDate DateTime, @endDate DateTime)RETURNS TABLE ASRETURN ( select [State], count (*) as [TotalOrderAmount] FROM [SQLBook].[dbo].[Orders] WHERE [OrderDate] between @startDate AND @endDate group by [State])GO SELECT * FROM GetDateRangewithordersAmount('2015-09-01','2015-10-31');GOarrow_forwardI created a database that contains four tables department, employee,address and contact info, then I stored 5 Records in each table. by Writing the PL/SQL Statement I should retrieve departments and their employees using package.arrow_forwardIn the Testa EV database design described in the previous question, please complete a field specifications form for the field 'Model_Cost' of the table 'Model_T'. The field records the cost of producing a specific EV model. Because its data come from the cost data of specific parts used to build the model, its value can be entered later and editing is allowed (null is allowed). The field value is required. Only decimal numeric data are supported for the entered value. The field can store a maximum of 10 digits (including 2 decimal places). The user of the database (data analyst) is responsible for entering and maintaining the data. No specific range of values is specified for this field. You should enter 'N/A' (or leave it unchecked) for elements that are not applicable.arrow_forward
- The purpose of this activity is to create a working mini-database system from a user’s basic requirements. SQL DDL and DML must be used to create, populate and update tables. This database is for a typical Columbus car dealership. We will keep track of all the cars on the lot. For each car we will track the model ( modelA, modelB, modelC or make up your own), the list price, a status (available, sold) and a list of options the car has. A car may have more than one option (you may make these up, example: sun roof, power windows, …).. When the car is sold, we will keep track of the date, and the name of the salesman that sold the car. For each salesman, we will keep track of their name, gender, salary, and total amount sold.arrow_forwardConsignment shops offer a great service to our communities in that they allow us to purchase slightly used goods at very valuable prices. The original owners of these goods bring in their merchandise to selI. Upon selling the item, the consignment shop retains 25% of the sale for their services. You are working for a local shop. Every month the database, containing the sales data produces a report that details the amount sales per each original owner. Your job is to write a program that will help analyze this data. The array of sales data is as follows: owner sales = [201.45, 550.00, 117.65, 55.25, 5.95, 365.451 Your program needs to create 4 functions accomplishing the following tasks: main: This function will call all of your other functions, in the following order: Print Sales, Find Lowest and Determine Payout. It will also print the lowest sales. Print Sales: This function will print each sale. • Find Lowest: This function will find the lowest sale and print it. Determine Payout:…arrow_forwardCreate a view vLab3_xxx in the class database list the staff who have the highest salary in each of the branch city. You will need both Staff and Branch table. The output header should be (city, name, salary) where the name is "fname lname".arrow_forward
arrow_back_ios
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