0% found this document useful (0 votes)
154 views2 pages

WIA2001/WIB2001 Database SEM 1, 2021/2022 Tutorial Week 10: Select From Where Where Like

This document contains sample SQL queries and questions related to database tables for a printing company and pet store. It also discusses the importance of database security and asks questions about data breaches, data protection acts, challenges in implementing security procedures, and best practices for threat reduction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views2 pages

WIA2001/WIB2001 Database SEM 1, 2021/2022 Tutorial Week 10: Select From Where Where Like

This document contains sample SQL queries and questions related to database tables for a printing company and pet store. It also discusses the importance of database security and asks questions about data breaches, data protection acts, challenges in implementing security procedures, and best practices for threat reduction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

WIA2001/WIB2001

DATABASE
SEM 1, 2021/2022

Tutorial Week 10

1. The following tables form part of a database for a printing company that handles printing
jobs for book publishers:

Publisher (pubID, pubName, street, city, postcode, telNo, creditCode)


BookJob (jobID, pubID, jobDate, description, jobType)
PurchaseOrder (jobID, poID, poDate)
POItem (jobID, poID, itemID, quantity)
Item (itemID, description, onHand, price)

Write SQL for the following :

a) List all publishers in alphabetical order of name.


SELECT pubName FROM Publisher
ORDER BY pubName;

b) List the names and phone numbers of all publishers who have a rush job (jobType with
value ‘R’).
SELECT pubName, telNo FROM Publisher P, BooJob B
WHERE P.pubID = B.pubID AND
WHERE B.jobType LIKE 'R%';

c) How many publishers fall into each credit code category?


SELECT COUNT(pubID)
FROM Publisher
GROUP BY creditCode;

d) List all job type’s with at least three printing jobs.


SELECT jobType FROM BookJob
WHERE COUNT() FROM BookJob >3

e) List all items with a price below the average price of an item.
2. Write the SQL statements that will answer questions a through g based on apart of tables in
Pet Store Database as shown below.

ANIMAL ( AnimalID, Name, Category, DateBorn, Gender, Color, ListPrice)


SALE_ANIMAL (SaleID, AnimalID, SalePrice)
SALE(SaleID, Date, EmployeeName, CustomerName, SaleTax)

a. List all the animal types in the store without duplicate

b. List all cats with white in color and has a list price of greater than 2000.

c. Count the number of animals in each category. List in descending order.

d. List all the animals for each category that contains more than 10.

3. Based on the talk entitled “The importance of Database Security”, answer the following
questions.

a. What are the impact of data breaches to an organization? Give TWO examples of
incidents of data breaches as given in the talk.

b. Briefly discuss and elaborate FOUR Data Protection acts

c. What are the biggest challenge(s) in implementing security procedures in


organizations, apart from financial matter?

d. Should you put all possible controls to reduce threat ?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy