Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views8 pages

01 Project

The document outlines a group project for a Database Lab course, focusing on the design of an Online Shopping System. It includes objectives such as creating a relational database using Oracle 10g, modeling relationships with an ERD, and practicing SQL commands. Additionally, it provides details on entity descriptions, database schema, and a lab practice assignment involving table modifications.

Uploaded by

1240101193
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)
6 views8 pages

01 Project

The document outlines a group project for a Database Lab course, focusing on the design of an Online Shopping System. It includes objectives such as creating a relational database using Oracle 10g, modeling relationships with an ERD, and practicing SQL commands. Additionally, it provides details on entity descriptions, database schema, and a lab practice assignment involving table modifications.

Uploaded by

1240101193
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/ 8

Group Project

Course Title:
Data Base Lab
ID:
003,086
Submitted To:
Sir Ahmed Saqib
Submitted by:
Mehmila Amjad, Eman
Fatima
Submission date:
16-06-25
Report writing
Project title:
Online shopping system

Introduction:
The Online Shopping System is designed to simplify the shopping experience by allowing
customers to browse products, place orders, and make payments digitally. It helps manage
customer information, product inventory, order details, and payment records. This system
reduces manual work, improves accuracy, and makes data retrieval easy for administrators and
users. It reflects a real-world e-commerce platform at the database level using structured tables
and relationships.

Objective:
The primary objective of this project is:
To design a relational database system that supports the core functions of online
shopping.
To use an ERD to model the relationships between various entities.
To implement the design using Oracle 10g with appropriate SQL commands.
To practice data normalization, foreign key constraints, and relational query
operations.

ERD Diagram:
Customer:
Product:

Orders:

Order_items:

Payment:
1

M 1 M

M
1 1

Entity Descriptions:
1. Customer
Stores information about the shoppers such as name, email, phone number, and address.
2. Product
Contains product details like name, description, price, and stock quantity.
3. Order
Represents each order placed by a customer with order date and total amount.
4. OrderItems
Stores each item that is part of a customer’s order, including product, quantity, and item
price.
5. Payment
Tracks the payments made for orders including mode, amount, and payment date.

Database Schema & SQL Commands:


Customer Table
CREATE TABLE CUSTOMER (
Cust_id NUMBER(5),
C_name VARCHAR2(50),
C_address VARCHAR2(100),
C_phone VARCHAR2(15),
Email VARCHAR2(50)
);

Product Table
CREATE TABLE PRODUCT (
Product_id NUMBER(5),
P_name VARCHAR2(50),
P_description VARCHAR2(100),
Price NUMBER(10,2),
Stock_qty NUMBER(5)
);

Order Table
CREATE TABLE ORDERS (
Order_id NUMBER(5),
Customer_no NUMBER(5),
Order_date DATE,
Total_amount NUMBER(10,2),
Status VARCHAR2(20)
);

OrderItems Table
CREATE TABLE ORDER_DETAILS (
Order_no NUMBER(5),
Prod_no NUMBER(5),
Quantity NUMBER(4),
Unit_price NUMBER(10,2)
);

Payment Table
CREATE TABLE PAYMENT (
Payment_id NUMBER(5),
Order_no NUMBER(5),
Payment_date DATE,
Amount NUMBER(10,2),
Method VARCHAR2(20)
);

LAB PRACTICE ASSIGNMENT:

1. Create a table EMPLOYEE with following schema:

(Emp_no, E_name, E_address, E_ph_no, Dept_no,


Dept_name,Job_id , Salary)

2. Add a new column; HIREDATE to the existing


relation.

3. Change the datatype of JOB_ID from char to


varchar2.

4. Change the name of column/field Emp_no to


E_no.

5. Modify the column width of the job


field of emp table.

Customer Table:
a. Create Table
b. Add new column: JOINDATE

c. Modify datatype of Email

d. Rename column Cust_id to Customer_no


e. Modify column width of C_name

You might also like