Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Republic of the Philippines

ISO 9001:2015
Camarines Sur Polytechnic Colleges

Name: Bernardo B. Podawan


Course Y/S: Bachelor of Science in Information Technology 2B

LT 04: Review on Relational Database Management


Systems

In Our database have several tables, such as:


carts: A table that stores information about user carts in the ecommerce platform, including the id of
the cart, the user_id who owns the cart, and the created_at timestamp.

customers: A table that stores information about customers of the ecommerce platform, including their
id, user_id, first_name, last_name, address, and phone_number.

orders: A table that stores information about orders placed on the ecommerce platform, including the id
of the order, the user_id who placed the order, the customer_id of the customer who made the order,
the created_at timestamp, the total price of the order, and the status of the order (e.g. "shipped",
"pending").
Republic of the Philippines

ISO 9001:2015
Camarines Sur Polytechnic Colleges

order_items: A table that stores information about the items included in each order, including the id of
the item, the order_id it belongs to, the product_id of the product ordered, the quantity of the product
ordered, the price of the product at the time of order, and the cart_id of the cart that the item belongs
to.

payments: A table that stores information about payments made for orders, including the id of the
payment, the order_id it belongs to, the method of payment, the amount paid, and the created_at
timestamp.

products: A table that stores information about the products available on the ecommerce platform,
including the product_id, product_name, product_description, price, image_upload, and category.

users: A table that stores information about users of the ecommerce platform, including their id,
user_id, user_name, user_email, password, user_address, and date when the user's account was
created

The relationships between the entities are as follows:


Each `cart` belongs to one user and one user can have many carts.
Each `customer` belongs to one user and one user can have many customers.
Each `order` belongs to one user, one customer, and one user and customer can have many orders.
Each order item belongs to one order and one product, and one order and product can have many order
items.
Each `payment` belongs to one order, and one order can have many payments.
Each `product` belongs to one category, and one category can have many products.
Each `user` can be associated with many carts, customers, and orders.

ALL of the queries that will use in our system or Ecommerce Platform

In admin site, it is needed to display the information on what the costumer/user buys in ecommerce
site.

In table `user` the entities user_name, user_email, password ,user_address are used to sign up in a Form
of our ecommerce site, to store in database and this query inserts the user's name, email, password, and
address into a database table named "forms". The query uses variables that are populated with data
from the HTML form that the user filled out. The login credentials for our e-commerce site are the
username and password entities in the "user". 4 entities in user are display in admin site.

In table `cart` are also need in ecommerce site to know what costumer want to buy. Costumer_id and
Product_id are need in this table. And it is also the entities are display in admin site.

In table `product` product_id are the primary this table and entities are need in database to know
costumer what product to buy and display in admin site and also in product page.
Republic of the Philippines

ISO 9001:2015
Camarines Sur Polytechnic Colleges

In table `payment` product_id, costumer_id and quantity are need in this table to know the costumer
how much the product and the admin. The `payment` table is also having choices to pay or payment
option which is cash on delivery or credit.

In table name `costumer` costumer_id are the primary key in this table, it will display in admin.

In table name `order_item` the attribute `costumer_id` and Product_id are foreign key of order_item,
The entities it is use to display in ecommerce site to know the costumer what item they order.

In table name `order` the `order_id` are the primary key product_id and user_id attributes are use in this
table it connect into oder site of ecommerce site.

You might also like