Advanced Database
Advanced Database
Presentation
by
Sheriff Ayew
About Imani Impressionz
• Imani Impressionz ltd is a printing firm that deals solely with printing
and graphic designing.
• The company can be located at Kokomlemle and satisfies the needs
of about 1,000 – 3,000 customers yearly.
• Imani Impressionz has two of its company in Accra.
• The main office block is located at Kokomlemle, while the annex is
located at Accra-Newtown.
• Currently, the company has 48 workers of which forty (40) are full
time workers while the other eight are part time workers.
Functions of the database
Two
One
Employee: (empid#, did#, brid# First name, Last name, Initials(Signature) gender,
address, dob, branch, job worked on, salary, date employed, status of employment
(full or part time), email, department, phone);
Job: (jid#, Name, date, time, price, date ordered, date submitted, job type);
Client: (cid#, jid# first name, last name, gender, initials(Signature), Date of Birth,
Address, Job ordered, email, city, phone);
Inventory: (itemid#, Name, date bought, supplier name, supplier address, unit price of
item,
price of item, quantity);
JB.Client Table
CREATE UNIQUE INDEX idx_jobOrdered ON JB.Client(jobOrdered);
INV.Inventory Table
CREATE UNIQUE INDEX idx_supplier ON INV.Inventory(supplier);
SELECT itemId,
nameOfItem, "Unit Price
Range" =
CASE SELECT empid, firstname,
WHEN unitPrice = LastName, dateEmployed,
0 THEN 'Invalid Item' employment_Status, Salary
WHEN unitPrice < FROM HR.Employees
50 THEN 'Under GHS 50' WHERE employment_Status =
WHEN unitPrice >= 'Full'
50 and unitPrice < 100 THEN AND (FirstName NOT LIKE 'A%')
'Under GHS100'
WHEN unitPrice >=
250 and unitPrice < 1000 SELECT jid, nameOfJob, price
THEN 'Under GHS1000' FROM JB.JOB
ELSE 'Over GHS WHERE price > 500
1000' ORDER BY price ASC
END
FROM INV.Inventory
ORDER BY itemId ;
Thank You for your Audience