0% found this document useful (0 votes)
9 views7 pages

Relational Database Model

The document provides an overview of database models, focusing on the relational database model, which organizes data into tables and uses keys to define relationships. It discusses the structure, advantages, disadvantages, and applications of relational databases in various fields such as banking, education, and e-commerce. The document emphasizes the importance of data integrity, normalization, and SQL operations in managing structured data efficiently.

Uploaded by

ruru21.mee
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Relational Database Model

The document provides an overview of database models, focusing on the relational database model, which organizes data into tables and uses keys to define relationships. It discusses the structure, advantages, disadvantages, and applications of relational databases in various fields such as banking, education, and e-commerce. The document emphasizes the importance of data integrity, normalization, and SQL operations in managing structured data efficiently.

Uploaded by

ruru21.mee
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

TABLE OF CONTENTS

1. Introduction
2. Database Models
3. Types of Database Models
4. The Relational Database Model
Definition
o

Structure of Relational Databases


o

Keys in Relational Databases


o

Relationships in Relational
o

Databases
Integrity Constraints
o

Normalization
o

SQL and Operations


o

5. Advantages and Disadvantages


6. Applications of Relational
Databases
7. Conclusion
8. References
1. INTRODUCTION

A database is a structured collection of data that enables efficient storage,


retrieval, and management of information. In modern computing systems,
databases play a vital role in ensuring that data is organized and accessible for
various applications such as banking systems, educational platforms, and e-
commerce systems.

To effectively organize and manage data, different database models are used.
These models define how data is structured, how relationships are formed, and
how users interact with the system. Among these models, the relational database
model stands out as the most widely used due to its simplicity, reliability, and
efficiency.

2. DATABASE MODELS
A database model is a conceptual framework that determines how data is stored,
organized, and manipulated within a database system. It provides the logical
structure that governs how data elements relate to one another and how they
can be accessed.

Database models are important because they ensure consistency, reduce


redundancy, and make it easier to retrieve and manage data efficiently.

3. TYPES OF DATABASE MODELS


 Hierarchical Model: Organizes data in a tree-like structure where each child
record has only one parent. It is simple but not flexible for complex
relationships.
 Network Model: Allows records to have multiple parent and child
relationships, making it more flexible than the hierarchical model but also
more complex to manage.
 Relational Model: Stores data in tables and uses keys to define
relationships between those tables. It is the most widely used model due to
its simplicity and efficiency.
 Object-Oriented Model: Stores data as objects, similar to object-oriented
programming, allowing better integration with modern programming
languages.
 NoSQL Model: Designed for handling large volumes of unstructured or
semi-structured data, offering high scalability and flexibility.

4. THE RELATIONAL DATABASE MODEL


4.1 Definition

The relational database model organizes data into tables (relations), where each
table consists of rows and columns. Relationships between tables are established
using keys. This model provides a clear and logical structure for storing structured
data.

4.2 STRUCTURE OF RELATIONAL DATABASES

The structure of a relational database is one of its most important features


because it determines how data is organized and accessed.

1. Tables (Relations)

A table represents a real-world entity such as a student, course, or product. Each


table is uniquely named and consists of columns and rows.

 Tables are the fundamental building blocks of relational databases


 Each table stores data about a specific subject
 Tables are independent but can be related

2. Rows (Tuples)

Rows represent individual records within a table.

 Each row contains a complete set of information about one entity


 No two rows should be identical when a primary key is used
 Rows are dynamic and can be added, modified, or deleted

3. Columns (Attribtes)

Columns define the properties or characteristics of the data stored in a table.

 Each column has a name and a data type


 Data types may include integers, strings, dates, etc.
 Columns enforce the structure and format of data

4. Domains

A domain is the set of allowable values for a column.

 Ensures data consistency


 Example: Age must be between 0 and 120
 Prevents invalid data entry

5. Schema and Instance

 Schema: The overall structure/design of the database


 Instance: The actual data stored at a particular time

6. Degree and Cardinality

 Degree: Number of columns in a table


 Cardinality: Number of rows in a table

Importance of Structure

 Ensures logical organization of data


 Makes querying efficient
 Reduces redundancy
 Improves maintainability

4.3 KEYS IN RELATIONAL DATABASES

 Primary Key (PK): A unique identifier for each record in a table. It ensures
that no two records are the same, cannot contain null values, and must
remain stable over time.
 Foreign Key (FK): A field that establishes a relationship between two tables
by referencing the primary key of another table, ensuring referential
integrity.
 Candidate Key: Any attribute that can uniquely identify a record. A table
can have multiple candidate keys, but only one is selected as the primary
key.
 Composite Key: A key made up of two or more attributes used together to
uniquely identify a record, commonly used in junction tables.
 Alternate Key: A candidate key that is not chosen as the primary key but
can still uniquely identify records.
 Super Key: A set of one or more attributes that can uniquely identify a
record.

4.4 RELATIONSHIPS IN RELATIONAL DATABASES

 One-to-One (1:1): A relationship where each record in one table


corresponds to exactly one record in another table, often used for
separating optional or sensitive data.
 One-to-Many (1:M): A relationship where one record in a table is
associated with multiple records in another table, making it the most
common type of relationship.
 Many-to-Many (M:N): A relationship where multiple records in one table
relate to multiple records in another table, typically resolved using a
junction table containing foreign keys.

4.5 INTEGRITY CONSTRAINTS

 Entity Integrity: Ensures that primary keys are unique and cannot be null,
maintaining the uniqueness of records.
 Referential Integrity: Ensures that foreign keys correctly reference existing
records in related tables, preventing invalid relationships.
 Domain Integrity: Ensures that all data entered into a column follows the
specified data type and allowable values.

4.6 NORMALIZATION

 First Normal Form (1NF): Ensures that all fields contain atomic values,
meaning each column holds only one value and there are no repeating
groups.
 Second Normal Form (2NF): Ensures that all non-key attributes are fully
dependent on the entire primary key, eliminating partial dependency.
 Third Normal Form (3NF): Ensures that non-key attributes do not depend
on other non-key attributes, eliminating transitive dependency.
Normalization improves data organization by reducing redundancy and
preventing anomalies.

4.7 SQL AND OPERATIONS

The SELECT statement is used to retrieve data from a database. It allows users to
specify which columns to display and can include conditions to filter results.

E.g SELECT * FROM Students;

The INSERT statement is used to add new records to a table.

E.g INSERT INTO Students VALUES (101, 'John', 'CS101');

The UPDATE statement is used to modify existing data.

E.g UPDATE Students SET Name = 'John Doe' WHERE Student_ID = 101;

The DELETE statement is used to remove records from a table.

E.g DELETE FROM Students WHERE Student_ID = 102;

5. ADVANTAGES AND DISADVANTAGES


Advantages

 Simplicity: Data is organized in tables, making it easy to understand and


manage.
 Data Integrity: Constraints and keys ensure that data remains accurate and
consistent.
 Reduced Redundancy: Normalization minimizes duplication of data.
 Flexibility: Supports complex queries and modifications using SQL.
 Security: Provides access control to protect sensitive data.
 Scalability: Can handle large volumes of structured data efficiently.
Disadvantages

 Complexity in Large Systems: Managing many tables and relationships can


become difficult.
 Performance Issues: Multiple table joins can slow down query execution.
 Rigid Schema: Requires predefined structure, making frequent changes
difficult.
 Storage Overhead: Indexes and keys consume additional storage.
 Limited for Unstructured Data: Not suitable for handling multimedia or
flexible data formats.

6. APPLICATIONS OF RELATIONAL DATABASES


In banking systems, relational databases are used to store and manage customer
accounts, transactions, and financial records. Relationships between tables
ensure that each transaction is correctly linked to the appropriate account and
customer.

In educational systems, relational databases manage student information, course


details, and enrollment records. Tables are connected using keys to track which
students are enrolled in which courses.

In e-commerce platforms, relational databases handle products, customers,


orders, and payments. These relationships enable efficient tracking of purchases,
inventory management, and transaction processing.

7. CONCLUSION
The relational database model remains the most widely used database model due
to its structured approach, reliability, and efficiency. By organizing data into
tables and using keys to establish relationships, it provides a powerful and flexible
way to manage structured data.

8. REFERENCES
 Codd, E. F. (1970). A Relational Model of Data for Large Shared Data Banks
 Silberschatz, A. – Database System Concepts
 Elmasri, R., Navathe, S. – Fundamentals of Database Systems
 Oracle and MySQL SQL Documentation

You might also like