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

Relational Database Design

Cs

Uploaded by

devileela921
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Relational Database Design

Cs

Uploaded by

devileela921
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Relational Database Design

Overview of Database Design


A thorough database design supports an effective development process and is critical to
successful database functionality and performance.
Database Design Objective
A well-designed database shall:
 Eliminate Data Redundancy: the same piece of data shall not be stored in more
than one place. This is because duplicate data not only waste storage spaces but
also easily lead to inconsistencies.
 Ensure Data Integrity and Accuracy:

Relational Database Design Process


Databases are usually customized to suit a particular application. No two
customized applications are alike, and hence, no two database are alike. Guidelines
(usually in terms of what not to do instead of what to do) are provided in making
these design decision, but the choices ultimately rest on the you - the designer.

Step 1: Define the Purpose of the Database (Requirement Analysis)


Gather the requirements and define the objective of your database, e.g. ...
Drafting out the sample input forms, queries and reports, often helps.

Step 2: Gather Data, Organize in tables and Specify the Primary Keys
Once you have decided on the purpose of the database, gather the data that are
needed to be stored in the database. Divide the data into subject-based tables.
Choose one column (or a few columns) as the so-called primary key, which uniquely
identify the each of the rows.

Step 3: Create Relationships among Tables


A database consisting of independent and unrelated tables serves little purpose (you
may consider to use a spreadsheet instead). The power of relational database lies in
the relationship that can be defined between tables. The most crucial aspect in
designing a relational database is to identify the relationships among tables. The
types of relationship include:
1. one-to-many
2. many-to-many
3. one-to-one

Step 4: Refine & Normalize the Design


For example,
 adding more columns,
 create a new table for optional data using one-to-one relationship,
 split a large table into two smaller tables

Stages of Design
Once you understand the basic structure of a relational database, you can begin the
database design process. Designing a database is a process that involves developing and
refining a database structure based on the requirements of your business.
Database design includes the following three stages:
1Conceptual Database Design
2Logical Database Design
3Physical Database Design

Conceptual Design
The first step in the database design cycle is to define the data requirements for your
business. Answering these types of questions helps you define the conceptual design:
•What types of information does my business currently use?
•What types of information does my business need?
•What kind of information do I want from this system?
•What are the assumptions on which my business runs?
•What are the restrictions of my business?
•What kind of reports do I need to generate?
•What will I do with this information?
•What kind of security does this system require?
•What kinds of information are likely to expand?
Identifying the goals of your business and gathering information from the different sources
who will use the database is an essential process. With this information you can effectively
define your tables and columns.
Logical Design

Logical database design helps you further define and assess your business’ information
requirements. Logical database design involves describing the information you need to
track and the relationships among those pieces of information.
Once you create a logical design, you can verify with the users of the database that the
design is complete and accurate. They can determine if the design contains all of the
information that must be tracked and that it reflects the relationships necessary to comply
with the rules of your business.

Creating a logical database design includes the following steps:


1Define the tables you need based on the information your business requires (as
determined in the conceptual design).
2Determine the relationships between the tables. (See the section Table Relationships for
more information.)
3Determine the contents (columns) of each table.
4Normalize the tables to at least the third normal form. (See the section Normalization for
more information.)
5Determine the primary keys. (See the section Keys for more information.)
6Determine the values for each column.

Table Relationships

In a relational database, tables relate to one another by sharing a common column. This
column, existing in two or more tables, allows you to join the tables. There are three types
of table relationships: one-to-one, one-to-many, and many-to-many.
A one-to-one relationship exists when each row in one table has only one related row in a
second table. For example, a university may decide to assign one faculty member to one
room. Thus, one room can only have one instructor assigned to it at a given time. The
university may also decide that a department can only have one Dean. Thus, only one
individual can be the head of a department.
A one-to-many relationship exists when each row in one table has many related rows in
another table. For example, one instructor can teach many classes.
A many-to-many relationship exists when a row in one table has many related rows in a
second table. Likewise, those related rows have many rows in the first table. A student can
enroll in many courses, and courses can contain many students.

You might also like