100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Case

Advance Database System Project

Rating
-
Sold
1
Pages
32
Grade
A+
Uploaded on
03-08-2023
Written in
2023/2024

Introduction………………………………………………………………………………….. 1 2 ER Diagram………………………………………………………………………………….. 3 3 Relational Design diagrams …………………………………………………………………. 4 4 Convert Database in 3NF ……………………………………………………………………. 5 5 SQL Statement………………………………………………………………………………. 10 5.1 Create Statement…………………………………………………………………………… 10 5.2 Insert Statement……………………………………………………………………………… 13 5.3 Select Statement……………………………………………………………………………... 17 5.4 Views………………………………………………………………………………………… 20 5.5 Trigger……………………………………………………………………………………….. 24 6 Testing & Validation. ………………………………………………………………………… 25 6.1 Constraint ……………………………………………………………………………………. 25 6.2 Database ……………………………………………………………………………………... 28 7 Conclusion…………………………………………………………………………………… 30 2 INTRODUCTION Problem Domain: The database is for a retail company that sells various products to customers through their website. The database includes information about customers, products, orders, invoices, payments, employees, sales, categories, and suppliers. Requirements: ● Customers should have a unique identifier, name, address, contact number, and email address. 32 ● Products should have a unique identifier, category, name, description, price, weight, UPS code, and inventory level. ● Orders should have a unique identifier, customer identifier, product identifier, order date, and quantity. ● Invoices should have a unique identifier, order identifier, payment identifier, discount identifier, customer identifier, invoice date, due date, total amount, discount amount, tax amount, paid amount, and payment status. ● Payments should have a unique identifier, order identifier, payment date, payment amount, and payment method. ● Employees should have a unique identifier, user name, password, name, and job title. ● Sales should have a unique identifier, customer identifier, employee identifier, date and time, and total amount. ● Categories should have a unique identifier, name, and description. ● Suppliers should have a unique identifier, name, address, city, state, country, contact information, and TIN number. ● Discounts should have a unique identifier, name, description, and discount amount. ● The inventory level of a product should be an integer that is required and cannot be negative. ● The weight of a product should be a real number that is required and cannot be negative. ● The quantity of an order should be an integer that is required and cannot be negative. ● The total amount of an order should be a real number that is required and cannot be negative. ● The total amount of an invoice should be a real number that is required and cannot be negative. ● The discount amount of an invoice should be a real number that is required and cannot be negative. ● The tax amount of an invoice should be a real number that is required and cannot be negative. ● The paid amount of an invoice should be a real number that is required and cannot be negative. ● The payment status of an invoice should be a text field that is required. 1 ● The payment amount of a payment should be a real number that is required and cannot be negative. Functional Dependencies: ● Products: product_id -> category_id, name, description, price, weight, ups, inventory_level, supplier_id ● Orders: order_id -> customer_id, product_id, order_date, quantity, total_amount ● Invoices: invoice_id -> order_id, payment_id, discount_id, customer_id, invoice_date, due_date, total_amount, discount_amount, tax_amount, paid_amount, payment_status ● Payments: payment_id -> order_id, payment_date, payment_amount, payment_method ● Employees: employee_id -> user_name, password, name, job_title, contact_info ● Sales: sale_id -> customer_id, employee_id, date_time, total_amount ● Category: category_id -> name, description ● Suppliers: supplier_id -> name, address, city, state, country, contact_info, TIN_number Multivalued Dependencies: ● None identified in the given schema.

Show more Read less
Institution
Module











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Module

Document information

Uploaded on
August 3, 2023
Number of pages
32
Written in
2023/2024
Type
Case
Professor(s)
Matthew long
Grade
A+

Subjects

£4.94
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
neelptl1999

Get to know the seller

Seller avatar
neelptl1999 (self)
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
2 year
Number of followers
0
Documents
1
Last sold
2 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions