0% found this document useful (0 votes)
2 views5 pages

Dbms Shankar

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

Dbms Shankar

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Relation data model

A relational data model in Database Management Systems (DBMS) is a


structured approach for organizing and managing data, relying on the
concept of relations, which are essentially tables. This model was introduced
by E.F. Codd in the 1970s and has become the foundation for most databases
today, like MySQL, Oracle, SQL Server, and PostgreSQL. Here’s an overview
of its main concepts:

Key Concepts
1. Relation (Table): The basic structure in a relational model is a relation
or table. Each relation represents an entity set (e.g., Employees,
Products).

2. Tuple (Row): Each row in a table is called a tuple, representing a single


record in the relation.

3. Attribute (Column): Columns in a table are attributes, representing the


properties or characteristics of the entity (e.g., EmployeeID, Name,
Department).

4. Domain: A domain is the set of permissible values for a given attribute.


For example, a “Salary” domain might include positive decimal
numbers only.

5. Relation Schema: Defines the structure of a table, including its name,


attributes, and the domain of each attribute. For example, the schema
for an Employee table might include attributes like EmployeeID, Name,
and Department.

6. Keys:

Primary Key: A unique identifier for each row (tuple) in a table. Each table
must have one primary key, like EmployeeID for an Employees table.
Foreign Key: A field in a table that uniquely identifies a row in another table,
establishing a relationship between two tables.

Candidate Key: Any attribute that can be a primary key. A table can have
multiple candidate keys, but only one is selected as the primary key.

Operations in Relational Model

The relational model supports various operations, which are used in


relational algebra and SQL to manipulate the data:

1. Select (σ): Extracts rows from a relation that meet a specified


condition.

2. Project (π): Selects specific columns from a relation, often used to


remove duplicates or to focus on certain attributes.

3. Join: Combines two relations based on a related attribute (foreign key).


Types of joins include inner, left, right, and outer joins.

4. Union (∪): Combines tuples from two relations with the same schema.
5. Difference (-): Returns tuples in one relation that are not present in
another.

6. Intersection (∩): Returns tuples that appear in both relations.

Advantages of the Relational Model

Data Integrity and Consistency: With primary and foreign keys, relational
databases enforce data integrity.

Ease of Use: SQL is a powerful language for querying and manipulating


relational data.

Flexibility: Supports complex queries, making it suitable for a wide range of


applications.

Normalization: Helps to reduce data redundancy and ensures efficient


storage.

Disadvantages of the Relational Model

Performance Issues: May have performance limitations with very large or


highly complex data.
Complexity in Relations: Sometimes, relationships become complex to
manage, particularly with highly interconnected data.

Scalability: Scaling out relational databases can be challenging in distributed


environments.

Relational data models are highly structured, suitable for handling large
volumes of transactional data, and offer strong consistency, making them
ideal for financial systems, enterprise applications, and any scenario
requiring reliable data integrity.

You might also like