[DB] Relational Data Architecture

A Relational Database (RDB) is the most popular and widely used database structure. RDB is a collection of data items organized as a set of tables from which data can be accessed easily.

 

1. Relationships

The core of RDB is the relationship between tables.

  • One-to-One: rare case, recheck your design whenever you encounter one-to-one relationships
  • One-to-Many: most common relationship, usually designed as a “Primary Key-Foreign Key” relationship
  • Many-to-Many: Usually used to join tables

 

2. Normalization

Normalization is a process that makes a data structure relational and has the following goals:

  • Removes redundant data
  • Protects the relational model
  • Improves scalability and flexibility

There are 9 rules for Normalization. But the first three rules suffice for most cases.

 

3. First Normal Form (1NF)

Any column that occurs multiple times in a table should be removed and placed in a different table.

 

4. Second Normal Form (2NF)

1NF + all data not relying on a table key to uniquely identify it should be removed and placed in a different table.

 

5. Third Normal Form (3NF)

1NF + 2NF + eliminate all non-key data that is dependent on other non-key data in the same table should be placed in a different table.

One thought on “[DB] Relational Data Architecture

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s