Pet-Shop Report
Pet-Shop Report
ERD:
I have created a database schema for Ir pet store that includes the following tables:
PRODUCT: This table contains information about the products available for sale in Ir
store, including the product name, description, price, and inventory level.
PET_CARE_LOG: This table is used to track the care and feeding of the animals in
Ir store. It includes information such as the type of animal, the frequency of feeding,
and any notes or observations about the animal's health and behavior.
CUSTOMER_SALE: This table records all of the sales made to customers, including
the customer's name, the date of the sale, and the total amount of the sale.
SALE_ITEM: This table lists the individual items that were included in each sale,
along with the product name, quantity, and price of each item..
In the pet store database schema, there are several tables that are related to each
other and store various types of data. These tables include PRODUCT,
CUSTOMER, PET_CARE_LOG, CUSTOMER_SALE, and SALE_ITEM. The
epet_data.doc file provides a detailed list of the columns and data for each of these
tables. Additionally, there is a view called MONTHLY_SALES that displays total
sales for each month and year combination, and a sequence called
PETSTORE_SEQ that generates unique primary key values for the PRODUCT,
CUSTOMER, and CUSTOMER_SALE tables.
The "tbl_pet" table stores information about pets that are posted on a platform
by their owners or pet shops. It has the following columns:
"pet_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"pet_description": a detailed description of the pet, including its color, birthday,
weight, and height
"pet_category_id": a foreign key that points to the "pet category" table
"vendor_id": a foreign key that links to the vendor or shop owner who posted
the pet information
"pet_images": images of the pet
"pet_status": this refers to the availability of the pet
"user_id": the user who is responsible for encoding, managing, updating, or
approving the posted information
This table is used to store information about pets that are available for
adoption or purchase on the platform. It allows users to browse through
different pets and their descriptions, view images of the pets, and see whether
the pets are currently available. The foreign keys in the table allow the
database to link the pet information to the corresponding vendor or pet
category, providing additional context and information about the pets.
The "tbl_pet_category" table stores the different types of pets that are allowed
to be posted on the platform. It has the following columns:
"pet_category_id": the primary key of the table, which is set to auto-increment
(the database will automatically assign a value starting from 1)
"pet_category_name": the name of the pet category (such as dog, cat, fish,
rabbit, etc.)
"user_id": the user who is responsible for encoding, managing, or updating
the information in the table
The "tbl_pet_product_category" table stores the list of pet product categories
for a multi-store pet shop management system. It has the following columns:
"product_category_id": the primary key of the table, which is set to auto-
increment (the database will automatically assign a value starting from 1)
"category_name": the category name of the pet product (such as dog food,
accessories, fish food, etc.)
"user_id": the user who is responsible for encoding, managing, or updating
the product category information
These tables are used to store and organize information about the different types
of pets and pet products that are available on the platform. The
"tbl_pet_category" table allows users to browse through the different types of
pets that are available, while the "tbl_pet_product_category" table allows users to
browse through the different categories of pet products. The primary keys in each
table are used to uniquely identify each record, and the foreign keys allow the
database to link the records to the corresponding users who are responsible for
managing the information.
The "tbl_pet_product" table stores information about pet products that are
posted by vendors or pet shop owners/managers on the platform. It has the
following columns:
"pet_product_id": the primary key of the table, which is set to auto-increment
(the database will automatically assign a value starting from 1)
"product_code": the unique code of the product, which can be in the form of a
barcode, QR code, or an alphanumeric combination
"product_name": the name of the pet product
"product_detail": a detailed description of the product
"product_category_id": the category or type of the product, as a foreign key
linking to the "pet product category" table
"quantity_on_hand": the number of available products
"vendor_price": the cost of the product from the vendor
"retail_price": the price at which the product will be sold to the customer (the
difference between the retail and vendor prices represents the profit or share
of the platform)
"discount": any discount offered on the product
"vendor_id": the vendor or pet shop owner/manager who posted the product,
as a foreign key linking to the "vendor" table
"status": the availability status of the product
"user_id": the user who is responsible for encoding, managing, updating, or
approving the product information
The "tbl_order" table stores information about customer orders on the
platform. It has the following columns:
"order_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"reference_no": a control or monitoring number for the order transaction
"customer_id": the customer who placed the order, as a foreign key linking to
the "customer" table
"order_date": the date when the order was placed
"order_status": the status of the order (such as accepted, declined, to be
delivered, to be received)
"expected_delivery_date": the date when the order is expected to be delivered
to the customer
"total_amount": the total amount of the ordered products
"number_of_items": the total number of items being ordered
"user_id": the user who is responsible for encoding, managing, updating, or
approving the order information
These tables are used to store and track information about the pet products and
orders on the platform. The "tbl_pet_product" table allows vendors to post
information about their products, including details, prices, and availability, while
the "tbl_order" table stores information about customer orders and their status.
The primary keys in each table are used to uniquely identify each record, and the
foreign keys allow the database to link the records to the corresponding users,
vendors, or customers.
The "tbl_order_detail" table stores itemized information about customer orders
on the platform. It has the following columns:
"order_detail_id": the primary key of the table, which is set to auto-increment
(the database will automatically assign a value starting from 1)
"order_id": a foreign key linking to the "order" table
"pet_product_id": the list of items ordered by the customer, as a foreign key
linking to the "pet product" table
"quantity": the number of items ordered by the customer (per product)
"quantity_price": the price of the item at the time of the order (since the price
of the product in the "pet product" table might change over time)
"status": this column stores the status of the item in the order (completed, in
delivery, cancelled)
"remarks": additional information or messages about the item or product
"vendor_id": the vendor who is responsible for managing and updating the
status of the item, as a foreign key linking to the "vendor" table
The "tbl_service" table stores information about services offered by vendors
on the platform. It has the following columns:
"service_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"reference_no": a unique reference number for the service
"service_name": the name of the service (such as grooming, vaccination,
check-up, etc.)
"service_detail": detailed information about the service
"service_fee": the fee for the service, including any additional charges from
the platform
"vendor_id": the vendor who posted the service information, as a foreign key
linking to the "vendor" table
"user_id": the user who is responsible for encoding, managing, updating, or
approving the service information
The "tbl_customer" table stores information about customers on the platform.
It has the following columns:
"customer_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"customer_code": a unique code given to the customer (such as a QR code or
barcode)
"avatar": the profile image of the customer
"customer_name": the full name of the customer
"email_address": the email address of the customer
"contact_number": the contact number of the customer, preferably a mobile or
cell phone number
"complete_address": the complete address of the customer
"username": the desired username of the customer
"password": the desired password of the customer
"status": the status of the customer's profile and registration (activated or
deactivated)
"user_id": the user who is responsible for accepting, approving, or
deactivating the customer's profile and registration, as a foreign key linking to
the "user" table
These tables are used to store and track information about customer orders,
services, and profiles on the platform. The "tbl_order_detail" table allows users to
view the itemized information about customer orders, while the "tbl_service" and
"tbl_customer" tables store information about the services offered by vendors and
the profiles and contact information of customers, respectively. The primary keys
in each table are used to uniquely identify each record, and the foreign keys
allow.
The "tbl_payment" table stores and archives payment information on the platform. It
has the following columns:
"payment_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"reference_no": a unique reference number for the order or service being paid for
"payment_for": a flag indicating whether the payment is for an order (0) or a service
(1)
"amount_paid": the amount paid by the customer
"remarks": additional information about the transaction
"payment_status": the status of the payment (such as partial or fully paid)
"paid_by": the person who processed the payment (usually the customer)
"user_id": the user who processed the payment information
The "tbl_vendor" table stores information about vendors on the platform. It has the
following columns:
"company_id": the primary key of the table, which is set to auto-increment (the
database will automatically assign a value starting from 1)
"company_name": the complete name of the vendor's company
"company_contact_person": the contact person for the company
"company_email": the official email address of the company
"company_contact_number": the contact information for the company (such as
landline or mobile phone numbers)
"company_website": the official website of the company (if any)
"company_profile": a column for storing information about the company, such as its
history, services offered, and other details
"vendor_username": a unique username for the vendor or shop owner/manager
"vendor_password": a strong password required for vendor login
"user_id": the user who is responsible for accepting, approving, or deactivating the
company's profile and registration, as a foreign key linking to the "user" table
The "tbl_user" table stores information about personnel who have access to the
records in the system. It has the following columns:
"user_id": the primary key of the table, which is set to auto-increment (the database
will automatically assign a value starting from 1)
"username": the username used by the personnel to log in, along with the password
"password": the password used by the personnel to log in, along with the username
"avatar": the profile image of the user
"fullname": the complete name of the personnel or user
"contact": the contact number of the personnel (such as a mobile or cell phone
number)
"email": the email address of the personnel/user
"user_category_id": the user group or category of the user
"status":