11 Database Design
11 Database Design
com
Database Design
Introduction:
Database: A Database is collection of related data, which can be of any size and complexity.
By using the concept of Database, we can easily store and retrieve the data. The major purpose
of a database is to provide the information, which utilizes it with the information’s that the
system needs according to its own requirements.
Database Design: Database design is done before building it to meet needs of end-users
within a given information-system that the database is intended to support. The database design
defines the needed data and data structures that such a database comprises
admin
article
category
city
country
customer
produce
product
product_purchase_bill
product_purchase_record
purchase_order
purchase_order_bill
purchase_request
seller
selling_product
state
variety
26
www.studentprojectguide.com
worker
worker_request
27
www.studentprojectguide.com
28
www.studentprojectguide.com
29
www.studentprojectguide.com
30
www.studentprojectguide.com
31
www.studentprojectguide.com
2. Entity-Relationship Diagram:
32
www.studentprojectguide.com
tables in a relational
database, with each row of
the table representing an
instance of that entity.
Relationships are
represented by Diamonds.
A relationship is a named
collection or association
between entities or used to
Relationship relate to two or more
entities with some common
attributes or meaningful
interaction between the
objects.
33
www.studentprojectguide.com
ER-Diagram:
password description
state_id
state
admin_id admin adds country
adds
state
has
publish
creates adds
adds city_id
category_id
article_id article city
category country_id
adds
category
article_type title state_id
category_type
seller_id city
seller
posts
contains provides C
selling_prod_id
quantity
category_id
category_id variety has
B for
defines
34
www.studentprojectguide.com
receives
purchase_request_id
request_date
purchase_request
customer_id
quantity
requires
purchase_order_id
purchase_order_time
purchase_order
purchase_order_date
generates
purchase_order_bill-id
purchase_order_bill purchase_order_id
paid_amt
35
www.studentprojectguide.com
customer_id B
customer_name customer
address from
buy
purchase_record_id
product_purchase_record
quantity
cost
generates
product_purchase_bill_id
product_purchase_bill customer_name
purchase_date
36
www.studentprojectguide.com
C worker_id
name
worker
address
sends
receives
from_date
worker_request
to_date
worker_request_id
task
37
www.studentprojectguide.com
38