Nowadays, data are extremely important for business development. It helps us understand our customers well so we have effective strategies. For example, Facebook, Amazon, Netflix, and Google are just some of the large corporations whose business model revolves around proving personalized recommendations to their users[1]
What is a Database?
A database is a tool for collecting and organizing information. Many databases usually start as a list; when this list grows bigger, redundancies and inconsistencies can appear. Understanding the data is more and more difficult and there are limited ways of searching or pulling subsets of data out for review. So, transferring the data to a database created by a database management system (DBMS) is a good idea.
A computerized database is a container of objects [2]. A database is made up of tables containing columns and rows. With a database, a row is called a record, and a cell is called a field.
A relational database includes 3 important components you should know:
Tables
Relationships
Keys
Tables
Tables are similar in appearance to spreadsheets.
Example: A table could be a dataset about people that contains a bunch of people’s names, phones, dates of birth, and gender.
This information would be stored in a table with a column and row format. Rows and columns are the very foundation of a table.
Columns are used to store different information about one person, rows store information about different people [1].
Keys
Keys support unique identification for all rows in the table. Without keys, maybe there would be no way to differentiate between entries. Two people in a table can have the same personal information and without a unique key, this is a hard thing to differentiate between them.
There are two types of keys: a primary key, and a foreign key.
Primary key: what makes rows become be unique.
Foreign key: what is used to connect tables together within a database. These links are called relationships
Relationships
Fig 1. Relationships [1]
Relationships are very essential for linking tables together. Why we need to link tables together within a database because how storing the database is also an equally important issue regarding the size of the database and security.
There are 3 types of relationships:
One to One (1-1): each record in a table is concerned with exactly one record in another table
One to Many (1-N): each record in a table can be referenced by multiple records in another table
Many to Many (N-N): with this type, it has to be implemented by USING ONE-TO-MANY RELATIONSHIPS and a junction table also called a linking table.
Summary
Tables, keys, and relationships are the three core components of a relational database.
With how to establish relationships in a database, let's access this blog
Reference
[1] Database Basics: Concepts & Examples for Beginners.
https://www.lido.app/post/database-101
[2] Database basics. Microsoft
https://support.microsoft.com/en-au/office/database-basics-a849ac16-07c7-4a31-9948-3c8c94a7c204