Relational Database Design (2024)

Relational Database Design

Relational Database Design

This chapter includes the following sections:

Overview of Database Design

Stages of Design

Overview of Database Design

This section introduces the fundamental principles of relational database design. A thorough database design supports an effective development process and is critical to successful database functionality and performance.

The Demodata sample database is provided with installation and is frequently used in the documentation to illustrate database concepts and techniques.

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.

Normalization

Normalization is a process that reduces redundancy and increases stability in your database. Normalization involves determining in which table a particular piece of data belongs and its relationship to other data. Your database design results in a data-driven, rather than process or application-driven, design which provides a more stable database implementation.

When you normalize your database, you eliminate the following columns:

Columns that contain more than one non-atomic value.

Columns that duplicate or repeat.

Columns that do not describe the table.

Columns that contain redundant data.

Columns that can be derived from other columns.

First Normal Form

Columns in the first normal form have the following characteristics:

They contain only one atomic value.

They do not repeat.

The first rule of normalization is that you must remove duplicate columns or columns that contain more than one value to a new table.

Tables normalized to the first normal form have several advantages. For example, in the Billing table of the sample database, first normal form does the following:

Allows you to create any number of transactions for each student without having to add new columns.

Allows you to query and sort data for transactions quickly because you search only one column (transaction number).

Uses disk space more efficiently because no empty columns are stored.

Second Normal Form

A table is in the second normal form when it is in the first normal form and only contains columns that provide information about the key of the table.

In order to enforce the second rule of normalization, you must move those columns that do not depend on the primary key of the current table to a new table.

A table violates second normal form if it contains redundant data. This may result in inconsistent data which causes your database to lack integrity. For example, if a student changes her address, you must then update all existing rows to reflect the new address. Any rows with the old address result in inconsistent data.

To resolve these differences, identify data that remains the same when you add a transaction. Columns like Student Name or Street do not pertain to the transaction and do not depend on the primary key, Student ID. Therefore, store this information in the Student table, not in the transaction table.

Tables normalized to the second normal form also have several advantages. For example, in the Billing table of the sample database, second normal form allows you to do the following:

Update student information in just one row.

Delete student transactions without eliminating necessary student information.

Use disk space more efficiently since no repeating or redundant data is stored.

Third Normal Form

A table is in the third normal form when it contains only independent columns.

The third rule of normalization is that you must remove columns that can be derived from existing columns. For example, for a student, you do not have to include an Age column if you already have a Date of Birth column, because you can calculate age from a date of birth.

A table that is in third normal form contains only the necessary columns, so it uses disk space more efficiently since no unnecessary data is stored.

In summary, the rules for the first, second, and third normal forms state that each column value must be a fact about the primary key in its entirety, and nothing else.

Keys

An ODBC key is a column or group of columns on which a table’s referential integrity (RI) constraints are defined. In other words, a key or combination of keys acts as an identifier for the data in a row.

For more information about referential integrity and keys, refer to Advanced Operations Guide.

Physical Design

The physical database design is a refinement of the logical design; it maps the logical design to a relational database management system. In this phase, you examine how the user accesses the database. This step of the database design cycle involves determining the following types of information:

Data you will commonly use.

Columns requiring indexes for data access.

Areas needing flexibility or room for growth.

Whether denormalizing the database will improve performance. (To denormalize your database, you reintroduce redundancy to meet performance.) For more information, see Normalization.

Relational Database Design (2024)

FAQs

Which is adequate for relational database design? ›

Which normal form is considered adequate for normal relational database design? 3NF is sufficient to design a normal relational database since a majority of third normal form tables stay free from anomalies of deletion, updating, and insertion.

What is good relational database design? ›

In the relational model, a table cannot contain duplicate rows, because that would create ambiguities in retrieval. To ensure uniqueness, each table should have a column (or a set of columns), called primary key, that uniquely identifies every records of the table.

Which answer choice best describes a relational database? ›

In a relational database it consists of separate tables or related data. Relational database is a set of formally described tables from which data can be accessed or reassembled in many different ways without having to recognize the database tables.

What is relational database design quizlet? ›

Relational Database. A database consisting of more than two related tables. The relationship between the tables is created by placing a primary key of the primary in to the secondary table. Database Tables. Database tables stores in rows and records in an organised.

What are the four 4 characteristics of properly designed relational database tables? ›

For a table to be in the First Normal Form, it should follow the following four rules:
  • Each column must have a separate field/attribute. ...
  • Values stored in a column should be of the same kind or type (domain). ...
  • All the columns in a table should have unique names. ...
  • The order in which data is stored, does not matter.

What are the key considerations of database design? ›

When you're ready to design your database, keep these best practices in mind.
  • Keep it simple. As you design, think about your users. ...
  • Normalize your data. ...
  • Consider the running conditions. ...
  • Collaborate more—bring the devs and DBAs together. ...
  • Model your data and look for the right fit for your needs.

What are the three key components of relational database design? ›

The basic structures of a relational database (as defined by the relational model) are tables, columns (or fields), rows (or records), and keys. This section describes these elements.

What is an example of a relational database design? ›

A relational database includes tables containing rows and columns. For example, a typical business order entry database would include a table that describes a customer with columns for name, address, phone number and so forth.

What are the three design goals for relational database? ›

7.20 List the three design goals for relational databases, and explain why each is de- sirable. Answer: The three design goals are lossless-join decompositions, dependency preserving decompositions, and minimization of repetition of information.

What is relational database in short answer? ›

A relational database is a collection of data points with pre-defined relationships between them. The relational model organizes data into tables — with each row representing an individual record and each column consisting of attributes that contain values.

What is the problem with relational database? ›

Challenges of an RDBMS

Performance: A relational database may experience reduced performance when organizing and querying through large databases with many complex items. Users might choose to use multiple databases instead to store and organize specific types of information.

What is a relational database elements design & advantages? ›

A relational database is a type of database that stores and organises related data points. Data is organised into tables that are linked based on shared data. They are the most common type of database used by businesses today. A database like this enables you to search across one or more tables with a single query.

What is relational design? ›

However, in recent years, there has been a shift towards a more emotional approach to design known as relational design. Relational design is not only about creating emotional connections but also about creating a sense of community and belonging.

How do you explain relational database model? ›

The relational model means that the logical data structures—the data tables, views, and indexes—are separate from the physical storage structures. This separation means that database administrators can manage physical data storage without affecting access to that data as a logical structure.

What are the best practices for database design? ›

Best practices for database schema design include using appropriate naming conventions, ensuring data security, thorough documentation, applying normalization judiciously, and having a deep understanding of the data and its attributes.

What are the key considerations in designing a relational database schema? ›

Key Considerations
  • Data model: The data model governs how data is saved and arranged in your database and serves as the architectural cornerstone of your database design. ...
  • Scalability: ...
  • Maintainability: ...
  • Data security: ...
  • Cloud vs. ...
  • Performance: ...
  • Data integration: ...
  • Future technology:
Dec 23, 2022

Top Articles
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 6180

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.