The following tables form part of a database held in a Relational Database Manag
ID: 3908898 • Letter: T
Question
The following tables form part of a database held in a Relational Database Management System for a printing company that handles printing jobs for book publishers: Publisher (pubID, pubName, street, city, postcode, telNo, creditCode) BookJob (iobID, pubID, jobDate, description, jobType) Purchase0rder (iobID, poID, poDate) PurchaseItem (jobID, poID, itemID, quantity) Item CitemID, description, onHand, price) In the above, primary keys are underlined where: Publisher contains publisher details and BookJob: contains details key. publD is the key. of the printing iobs (books or part books) and joblD is the e PurchaseOrder: A printing job requires the use of materials, such as paper and ink which are assigned to a job via purchase orders. This table contains details of the purchase orders for each job and the key is joblD/polD. Each printing job may have several purchase orders assigned to it. Purchaseltem: Each purchase order may contain several PO items. This table contains details of the PO items and joblD/polD/itemlD form the key. Item: contains details of the materials which appear in POltem, and the key is itemlD.Explanation / Answer
4. Select count(pubID) from Publisher group by creditCode;
5. Select * from Item where price <(Select avg(price) from Item);
6. Select jobType,count(jobID) from BookJob group by jobType having jobType= 'Printing' and count(jobID) >= 3;
7. Create view Publisher_Rush_Printing as Select pubID,pubName,street,city,postCode,telNo from Publisher inner join BookJob on Publisher.pubID = BookJob.pubID where jobType = 'Rush Printing';
Do ask if any doubt. Please upvote.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.