- Relational Model Overview:
- The relational model is a way to organize and represent data in a structured manner.
- It’s commonly used in commercial applications for managing data.
- It uses tables to represent data and the relationships between different pieces of data.
- Each table has columns (attributes) with unique names.
- Example Database:
- Imagine you have information about bank customers, their accounts, and the relationship between customers and accounts.
- Tables:
- Customer Table (Table 2.1.1):
- Columns:
cust_id,c_name,c_city - Rows represent different customers with their ID, name, and city.
- Columns:
- Account Table (Table 2.1.2):
- Columns:
acc_no,balance - Rows represent different accounts with their number and balance.
- Columns:
- Depositor Table (Table 2.1.3):
- Columns:
cust_id,acc_no - Rows represent the relationship between customers and their accounts
- Columns:
- Customer Table (Table 2.1.1):
Customer Table (Table 2.1.1):
| cust_id | c_name | c_city |
|---|---|---|
| C_101 | Ajay | Delhi |
| C_102 | Amit | Mumbai |
| C_103 | Alok | Kolkata |
| C_104 | Akash | Chennai |
Account Table (Table 2.1.2):
| acc_no | balance |
|---|---|
| A-1 | 1000 |
| A-2 | 2000 |
| A-3 | 3000 |
| A-4 | 4000 |
Depositor Table (Table 2.1.3):
| cust_id | acc_no |
|---|---|
| C_101 | A-1 |
| C_102 | A-2 |
| C_103 | A-3 |
| C_104 | A-4 |