0% found this document useful (0 votes)
4 views

Section 2

The document outlines the purpose and steps involved in designing a relational database, emphasizing the importance of requirement analysis, conceptual design, and implementation. It details the components of an Entity-Relationship Diagram (ERD), including entities, attributes, and their types, such as single-valued, multi-valued, composite, derived, and key attributes. The document serves as a guide for structuring and organizing data effectively within a database system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Section 2

The document outlines the purpose and steps involved in designing a relational database, emphasizing the importance of requirement analysis, conceptual design, and implementation. It details the components of an Entity-Relationship Diagram (ERD), including entities, attributes, and their types, such as single-valued, multi-valued, composite, derived, and key attributes. The document serves as a guide for structuring and organizing data effectively within a database system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Design a Database

Purpose of Design Database

• Database design is the process of determining and


structuring how data is organized, stored, and accessed
within a system. It involves defining the data structure,
relationships between data objects, and constraints to
ensure the integrity and efficiency of the database.
• The goal of database design is to create a database schema
or data model that describes how data is organized within
the system.
Step to design a Relational Database

1. Requirement analysis: Firstly, you need to identify the requirements of


the system and the project. Meet and discuss with stakeholders or users to
understand the system's needs and objectives.
2. Requirement specification: Next, analyze the specific requirements of the
system. Identify the main entities, attributes, and relationships between
them. Use techniques such as Data Flow Diagrams (DFD) and Entity-
Relationship (ER) models to gain a better understanding of the
requirement specifications.
3. Conceptual design: At this stage, you will create a conceptual model for
the database. Use the Entity-Relationship (ER) diagram to represent
entities, attributes, and their relationships. The ER diagram will help you
identify the main entities, primary keys, and relationships between them.
Step to design a Relational Database

4. Logical design: In this step, you translate the conceptual model into a
logical data model. Use the relational model to convert entities,
attributes, and relationships into tables, fields, and keys in the relational
database. Determine constraints and relationships between the tables.
5. Physical design: In this step, you determine how the database will be
physically implemented on a specific system. Determine data types for
fields, define indexes, data partitioning, and optimize the performance
of the database.
6. Implementation and deployment: This step involves creating tables,
fields, and relationships in the actual database. Data is imported into
the database, and applications or user interfaces are developed to
access and interact with the database.
Components of ERD
‒ An Entity is real-world object, including object that are visible (visual entities, e.g.
students, clothes, motorbikes, ...) or invisible (abstract but identifiable entities, e.g.
department, product type, ...).
‒ An Entity Set in an ERD (Entity-Relationship Diagram) refers to a group of entities
with similar characteristics and attributes within a system. It represents a collection
of objects of the same type in a database.
‒ Entities in ERD are represented by rectangles (strong entities) or rectangles with 2
borders around each other (weak entities).
+ A strong entity in an ERD (Entity-Relationship Diagram) is an entity that exists
independently, has its own significance, and possesses its own primary key. It does not
depend on any other entity within the system.
+ A weak entity is an entity that does not exist independently and relies on a strong entity to
be identified and described. A weak entity does not have its own separate primary key but
instead uses a foreign key in combination with the primary key of the strong entity. A weak
entity cannot exist without a related strong entity.
Entity Relationship Diagram

‒ An Entity-Relationship Diagram (ERD), also known as an


Entity-Relationship Model, is a diagram used in the
process of database design to illustrate the structure of data
and the relationships between entities in a system. An ERD
represents entities, relationships, and attributes of entities.
Components of ERD

‒ An attribute is a specific characteristic or information


about an entity. Attributes describe the features, properties
of an entity and provide information about it.
‒ Each entity in an ERD can have one or more attributes. For
example, in the "Employee" entity, attributes may include
"Full Name," "Date of Birth," "Address," "Phone
Number," and "Email."
Types of Attribute

‒ A single-valued attribute is a type of attribute that contains


only one unique value for each entity. This means that an
entity cannot have multiple values for a single-valued
attribute. Single-valued attributes are commonly used for
characteristics or information that are associated with a
specific value for each entity.
‒ For example, in the "Student" entity, the attribute "Student ID"
can be a single-valued attribute. Each student has only one
unique student ID for identification.
Types of Attribute

‒ A multi-valued attribute is a type of attribute that can


contain multiple values for each entity. This means that an
entity can have multiple distinct values for a multi-valued
attribute. Multi-valued attributes are commonly used for
characteristics or information that can have multiple non-
uniform values associated with each entity.
‒ For example, in the "Product" entity, the attribute "Color" can be
a multi-valued attribute. Each product can have multiple
different colors, such as "Red," "Blue," and "Yellow."
Types of Attribute
‒ A composite attribute is a type of attribute that is formed by
combining multiple smaller components. It represents a
characteristic or information that can be decomposed into
smaller parts.
‒ Composite attributes are commonly used to store complex
information and break them down into smaller components for
efficient data management. They help improve organization and
manipulation of data in a database system.
‒ For example, in the "Address" entity, the attribute "Address" can be a
composite attribute. It can be divided into components such as "House
Number," "Street Name," "Ward," "District," "City," and "Country."
Types of Attribute
‒ A derived attribute is an attribute that is computed or derived
from other attributes of the same entity. It is not directly stored
in the database but is calculated or determined based on other
attributes.
‒ Derived attributes are often used to generate dependent
information or perform calculations based on existing attributes.
They help reduce data redundancy and ensure consistency and
accuracy in the information.
‒ For example, in the "Student" entity, the attribute "Age" can be
considered a derived attribute. Instead of storing individual age values,
the age of a student can be calculated based on their date of birth.
Types of Attribute
‒ A key attribute is an attribute or a set of attributes used to
uniquely identify each entity within a set of entities. It plays a
crucial role in determining the uniqueness of each entity. The
key attribute can be a single attribute or a combination of
multiple attributes.
‒ The key attribute ensures the uniqueness and non-repetitiveness
of each entity in the database. It is also used to establish
relationships between different entities in the ERD model.
‒ For example, in the "Student" entity, the attribute "Student ID" can be
used as a key attribute to uniquely identify each student in the system.
Symbols of the components of ERD

You might also like