Dbms C
Dbms C
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
SUBMITTED BY-
ANILA VS-22BBTCS028
ABHISHEK MT-22BBTCS00d8
AKASH A-22BBTCS019
CERTIFICATE
……………………… …………………..
1…………………….. …………………
……
2…………………….. …………………
……
DECLARATION
ABHISHEK MT
(22BBTCS008)
Date:
AKASH A
(22BBTCS019)
INTRODUCTION
E-COMMERCE WBSITE DEVOLPMENT :
The Online Shopping System of its backbone is database, which stores and
organizes all relevant data efficiently. The database schema composed tables for
customer, products, orders, payments, reviews, catagory and administrative
functions. Relationships between these entities are established to ensure data
integrity and optimize system performance.
ER DIAGRAM :
SAMPLE QUERIES:
Table Creations:
ORDER;
CREATE TABLE orders (
order_id NUMBER PRIMARY KEY,
product_name VARCHAR2(100)
)
USER;
CREATE TABLE users (
user_id NUMBER PRIMARY
KEY, user_name
VARCHAR2(100),
user_address VARCHAR2(255)
)
CART;
CREATE TABLE cart ( cart_id
NUMBER PRIMARY KEY,
user_name VARCHAR2(100),
product_name
VARCHAR2(100)
)
Product:
CREATE TABLE product (
product_id NUMBER PRIMARY
KEY, product_category
VARCHAR2(100),
product_name VARCHAR2(100),
product_price NUMBER,
product_brand VARCHAR2(100)
)
ITEM_PURCAHSED;
CREATE TABLE item_purchased (
ref_no NUMBER PRIMARY KEY,
user_name VARCHAR2(100),
product_name VARCHAR2(100),
price NUMBER, purchase_date
DATE
)
DESCENDING ORDER;
ASCENDING ORDER
NORMALIZATION:
Table ORDERS
To achieve 2NF, a table must first satisfy 1NF, and then all non-key attributes must be fully
functional dependent on the primary key. In simpler terms, all attributes must rely on the
entire primary key, not on a part of it
3NF (Third Normal Form):
To achieve 3NF, a table must first satisfy 2NF, and then it must ensure that there are no transitive
dependencies; that is, no non-key attribute should depend on another non-key attribute.The original
table is already in 3NF because there are no transitive dependencies. Each non-key attribute
(product_name) depends directly on the primary key (order_id)
Table USER;
CART;
1NF (First Normal Form):
In the first normal form, each column should contain atomic values, meaning no column should have
multiple values or repeating groups. The table is already in 1NF since each column contains atomic
values.