|
The most tedious task to develop any system is the database design. It needs in depth knowledge of the operations in that system and experience to design any database. The following are the initial steps to develop any database.
Step 1:- Identifying the various entities of the system.
First step is to identify the entities for the database of your system. Entities are identified during the conceptual design phase of database and application design. Entity could be anything which has a distinct and separate existence (living or non-living). The function that an entity plays in a relationship is called its role. Let’s take an example of company:
COMPANY is an entity which has some characteristics like department, vendors, location, etc. And another entity is EMPLOYEE with characteristics such as Employ’s name its designation, etc and EMPLOYEE is related to the COMPANY as COMPANY gives salary to the EMPLOYEE and takes work from EMPLOYEE.
 Entity Set: An Entity Set is a set of entities of the same type, EMPLOYEE is the entity set with attributes or characteristics Name and Designation. We can make a table with the help of above diagram EMPLOYEE
Emp_Name |
Emp_Designation
|
Harry
|
Manager
|
Tom
|
Accountant
|
Types of Entities:
- Weak Entity Set :- A weak entity set does not have a Primary key. A weak entity cannot be uniquely identified by its own attributes alone. The existence of a weak entity set depends on the existence of an identifying entity set
- Strong Entity Set:-An entity set that has a primary key is referred as a strong entity set.
Step 2:- Identifying the relation between the discovered entities in step 1.
Entity Relationship Model says that divide your database in two logical parts, entities and relations. Next step is to identify the relationship between entities. CUSTOMER and PRODUCT are two entities, CUSTOMER buys PRODUCT, and so BUYS is the relation in between CUSTOMER and PRODUCT.

A relationship is an association among several entities.

One entity can be associated with another entity via a relationship set The mapping cardinality must be one of the following:
- One-to-one
- One-to-many
- Many-to-one
- Many-to-Many
We distinguish among these types by drawing either a directed line signifying “one, “or an undirected line, signifying “many,” between the relationship set and the entity set.
One-to-one

A customer is associated with at most one loan via the relationship BORROWER A loan is associated with at most one customer by a relationship BORROWER.
One-to-many

In the one-to-many relationship, a LOAN is associated with at most one CUSTOMER by a relationship BORROWER, a CUSTOMER is associated with several loans by BORROWER.
3. Many-to-One
In the many-to-one relationship, a LOAN is associated with several or none CUSTOMER via BORROWER, a CUSTOMER is associated with at most one LOAN by BORROWER.
4. Many-to-Many
A CUSTOMER is associated with several or none LOAN by BORROWER and a LOAN is associated with several or none CUSTOMER by relationship BORROWER.

Step 3:- Creating charts for interaction between the entities along with their relationships. (E-R Diagrams) Now in this step we design the entity relationship diagram of our database for our application, it is possible to define a set of entities and the relationships among them with help of ER-Diagram.

|