You are on page 1of 4

INTRODUCTION

A database model is a type of data model that determines the logical structure of a database and
fundamentally determines in which manner data can be stored, organized and manipulated. The most
popular example of a database model is the relational model, which uses a table-based format. An entity
relationship diagram (ERD), also known as an entity relationship model, is a graphical representation of an
information system that depicts the relationships among people, objects, places, concepts or events within
that system.
In this assignment I’ve created one portion of a database and built an E-R diagram of that database.

PURPOSE

This assignment was created for the purpose of an assignment instructed by our honorable faculty Dr. Md.
Shohrab Hossain [Associate Professor, Dept. of CSE, BUET].
In the process of creating this model, I’ve found every topic of our class helpful and guiding me throughout
the process. I have created this database model to help understand how different parts of a ReadyMade
Garments company works and which data can be gathered from those parts. Typically a ReadyMade
Garments Company consists of Buyer, Merchandiser, Production, Commercial, suppliers and planning. In this
model, I’ve only focused on the Buyer database. From this data, several people of an organization holding
different designation having different privileges can generate day-to-day reports, can pull information of
major buyers of the company and forecast for their orders.
DIAGRAM
DESCRIPTION

ENTITIES
1. Buyers
2. Buyer_Productlist
3. Buyer_Companies
4. Buyer_Countries
5. Buyer_Quotation
6. Pricing
7. Thread
8. Lot
9. Fabric
These entities has multiple attributes with integrity constraints such as not null, primary key and unique.
These integrity constraints will help the database to be consistent all the time.
A primary key is a special relational database table column (or combination of columns) designated to
uniquely identify all table records. A primary key's main features are: It must contain a unique value for each
row of data. It cannot contain null values.
A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table or
the same table. In simpler words, the foreign key is defined in a second table, but it refers to the primary key
or a unique key in the first table.
In the diagram, Yellow keys represent primary key and Red Keys represent foreign keys.

RELATIONSHIPS
A relationship, in the context of databases, is a situation that exists between two relational database tables
when one table has a foreign key that references the primary key of the other table. Relationships allow
relational databases to split and store data in different tables, while linking disparate data items.
In the diagram, relationships between two entities are represented as a separate table with foreign keys of
both tables. One example of such relationship is buyer_has_countries.

CONSTRAINTS
A constraint is usually associated with a table and is created with a CREATE CONSTRAINT or CREATE
ASSERTION SQL statement. They define certain properties that data in a database must comply with.
CARDINALITY CONSTRAINTS
In the diagram, single line represents one and crow’s foot represents many relationship.
TOTAL PARTICIPATION: every entity in the entity set participates in at least one relationship in the
relationship set
In the diagram Total participation is depicted as a double crossed line over the cardinality constraint
line.
PARTIAL PARTICIPATION: some entities may not participate in any relationship in the relationship
set
In the diagram Total participation is depicted as a Single crossed line over the cardinality constraint
line.

FUNCTIONS

Functions of the database model can be:


1. Buyer Data: It can generate reports of buyer data for annual reports.
2. Buyer Companies: The E-R model can generate list of companies the organization deal with
3. Buyer Products: The enterprise can generate list of products and types of products its buyers sell to
build strategic plan.
4. Lot: From lot options, the enterprise can generate reports about which lots are selling and why the
rest of lots are not chosen by buyers.
5. Order: From the order table and relationships related to it, the enterprise can create a standard order
chart or such to standardize its products.
6. Fabrics: From fabrics table and related relationships, the enterprise can have some idea about supply
and demand of fabrics they use or the buyer prefers.

CONCLUSION

In the end, I would like to than my honorable faculty Dr. Md. Shohrab Hossain for giving us such an exciting
project to work on. This type of E-R models are very helpful for enterprises to gain insights about their
organizations and outside parties while making strategic, production, forecast planning. I have tried to
create a model that can be used by companies of ReadyMade Garments industries. I hope this model will
serve its purpose of creating a bigger database model which will be used by industry giants.

You might also like