Overview Database Design Process
There are two main activities in database design process, there are : database design and applications design. Application design focuses on the programs and interfaces that access the database, generally considered part of software engineering. Next, in this chapter, we will focus on database design that purpose to design the conceptual schema for a database application.

ER Model Concepts
Entity and Attribute
Entities are specific objects or things in the mini-world that are represented in the database. For example the EMPLOYEE Bayu Atmaja, the Research DEPARTMENT, the Product X PROJECT. Attributes are properties used to describe an entity. For example an EMPLOYEE entity may have the attributes Name, SSN, Address, Sex, BirthDate. A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name=’Bayu Atmaja’, SSN=’123456789′, Address =’2, Sidakarya, Denpasar, TX’, Sex=’M', BirthDate=’27-JAN-89‘. Each attribute has a value set (or data type) associated with it – e.g. integer, string, subrange, enumerated type, etc.
Types of Attribute
- Simple
- Composite
- Multi-valued
Each entity has a single atomic value for the attribute. For example, SSN or Sex.
The attribute may be composed of several components. For example: Address(Apt#, House#, Street, City, State, ZipCode, Country), or Name(FirstName, MiddleName, LastName). Composition may form a hierarchy where some components are themselves composite.

An entity may have multiple values for that attribute. For example, Color of a CAR or PreviousDegrees of a STUDENT.
In general, composite and multi-valued attributes may be nested arbitrarily to any number of levels, although this is rare. For example, PreviousDegrees of a STUDENT is a composite multi-valued attribute denoted by {PreviousDegrees (College, Year, Degree, Field)}. Multiple PreviousDegrees values can exist. Each has four subcomponent attributes: College, Year, Degree, Field.
Entity Types and Key Attributes
Entities with the same basic attributes are grouped or typed into an entity type. For example, the entity type EMPLOYEE and PROJECT. An attribute of an entity type for which each entity must have a unique value is called a key attribute of the entity type. For example, SSN of EMPLOYEE. A key attribute may be composite. VehicleTagNumber is a key of the CAR entity type with components (Number, State). An entity type may have more than one key. For example, the CAR entity type may have two keys: VehicleIdentificationNumber (popularly called VIN) and VehicleTagNumber (Number, State), aka license plate number. Note : each key is underlined.
Displaying an Entity Type
In ER diagrams, an entity type is displayed in a rectangular box and attributes are displayed in ovals. Each attribute is connected to its entity type. Components of a composite attribute are connected to the oval representing the composite attribute. Each key attribute is underlined. Multivalued attributes displayed in double ovals. For illustration see figure 3.7.
Entity Set
Each entity type will have a collection of entities stored in the database. Figure 3.7 shows three CAR entity instances in the entity set for CAR. Same name (CAR) used to refer to both the entity type and the entity set. Entity set is the current state of the entities of that type that are stored in the database.
Based on the requirements, we can identify four initial entity types in the COMPANY database: DEPARTMENT, PROJECT, EMPLOYEE, DEPENDENT.
Relationship
The initial design is typically not complete. Some aspects in the requirements will be represented as relationships.
ER model has three main concepts:
- Entities (and their entity types and entity sets)
- Attributes (simple, composite, multivalued)
- Relationships (and their relationship types and relationship sets)
A relationship relates two or more distinct entities with a specific meaning. For example, EMPLOYEE John Smith works on the ProductX PROJECT, or EMPLOYEE Franklin Wong manages the Research DEPARTMENT.
Relationships of the same type are grouped or typed into a relationship type. For example, the WORKS_ON relationship type in which EMPLOYEEs and PROJECTs participate, or the MANAGES relationship type in which EMPLOYEEs and DEPARTMENTs participate.
The degree of a relationship type is the number of participating entity types.
In ER diagrams, we represent the relationship type as follows: diamond-shaped box is used to display a relationship type and connected to the participating entity types via straight lines.
An relationship type whose with the same participating entity type in distinct roles. Example: the SUPERVISION relationship. EMPLOYEE participates twice in two distinct roles: supervisor (or boss) role and supervisee (or subordinate) role.
Weak Entity Types
Weak entity types is an entity that does not have a key attribute. A weak entity must participate in an identifying relationship type with an owner or identifying entity type. Entities are identified by the combination of: a partial key of the weak entity type and the particular entity they are related to in the identifying entity type.
Constraint on Relationships
Cardinality Ratio (specifies maximum participation) :
- One-to-one (1:1)
- One-to-many (1:N) or Many-to-one (N:1)
- Many-to-many (M:N)
Existence Dependency Constraint (specifies minimum participation) (also called participation constraint)
- zero (optional participation, not existence-dependent)
- one or more (mandatory participation, existence-dependent)
A relationship type can have attributes: For example, HoursPerWeek of WORKS_ON. Its value for each relationship instance describes the number of hours per week that an EMPLOYEE works on a PROJECT. A value of HoursPerWeek depends on a particular (employee, project) combination. Most relationship attributes are used with M:N relationships.
Notation for ER Diagrams

Relationships of Higher Degree
Relationship types of degree 2 are called binary. Relationship types of degree 3 are called ternary and of degree n are called n-ary. In general, an n-ary relationship is not equivalent to n binary relationships. Constraints are harder to specify for higher-degree relationships (n > 2) than for binary relationships.
In general, 3 binary relationships can represent different information than a single ternary relationship (see Figure 3.17a and b on next slide). If needed, the binary and n-ary relationships can all be included in the schema design (see Figure 3.17a and b, where all relationships convey different meanings). In some cases, a ternary relationship can be represented as a weak entity if the data model allows a weak entity type to have multiple identifying relationships (and hence multiple owner entity types) (see Figure 3.17c).

Reference : Elmasri, Navathe. 2007. Fundamentals of Database Systems
Dewa,
I want to thank you for your post, It’s great one and it was so useful for me in my work.
Nice blog… I will be reading
.