0% found this document useful (0 votes)
8 views11 pages

2-Relational Database & ER Model

The document outlines the fundamentals of Relational Database Management Systems (RDBMS), including key features, Codd's Rules, and the relational model that organizes data into tables. It discusses optimization techniques for enhancing database performance, the roles of tables and views, and the concept of entities, including strong and weak entities. Additionally, it explains the importance of Entity-Relationship Diagrams (ER Diagrams) in visualizing relationships between entities for effective database design.

Uploaded by

jallumanikanta07
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)
8 views11 pages

2-Relational Database & ER Model

The document outlines the fundamentals of Relational Database Management Systems (RDBMS), including key features, Codd's Rules, and the relational model that organizes data into tables. It discusses optimization techniques for enhancing database performance, the roles of tables and views, and the concept of entities, including strong and weak entities. Additionally, it explains the importance of Entity-Relationship Diagrams (ER Diagrams) in visualizing relationships between entities for effective database design.

Uploaded by

jallumanikanta07
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
You are on page 1/ 11

Relational Database & eR

MoDel

1. Relational System
A Relational Database Management System (RDBMS) is a
type of DBMS that organizes data into structured tables. Data
within these tables are related to each other, allowing
complex queries to be performed efficiently. RDBMS systems
use structured query language (SQL) for querying and
managing data.
Key Features of RDBMS
• Data Structure: Uses tables to organize data, where
each table has rows and columns.
• Data Integrity: Ensures that data remains accurate and
consistent.
• Data Relationships: Data in one table can relate to data
in another table.
• Scalability: Supports large amounts of data while
maintaining efficiency.
2. Codd’s Rules
Edgar F. Codd introduced a set of 12 rules, now known as
Codd's Rules, to define what a fully functional RDBMS should
support. These rules guide RDBMS functionality to ensure
consistency, integrity, and data independence. Here’s a
summary of some essential rules:
1. Information Rule: All data is stored in tables, including
metadata (data about data).
2. Guaranteed Access Rule: Every piece of data should be
accessible without ambiguity.
3. Systematic Treatment of NULL Values: NULL values
represent missing or unknown data without affecting
data integrity.
4. Dynamic Online Catalog: Metadata should be stored in
the form of tables and be accessible through the same
query language.
5. Comprehensive Data Sub-language Rule: An RDBMS
must support at least one language that can handle data
manipulation, definition, and transaction management.
These rules form the foundation of relational systems,
ensuring that data remains organized and accessible within
an RDBMS.
3. Relational Model
The Relational Model organizes data into tables (also called
relations), which contain rows (tuples) and columns
(attributes). This model is based on set theory and is widely
used for managing structured data. Key elements of the
relational model include:
• Relation: Represents a table in the database.
• Tuple: A single row in a table.
• Attribute: A column in a table, representing a specific
data type.
• Domain: The set of valid values an attribute can take.
The relational model emphasizes data integrity and
consistency, ensuring that data adheres to defined rules and
constraints.
4. Optimization
Query Optimization is a critical process in RDBMS where SQL
queries are optimized to enhance database performance.
When a query is executed, the DBMS determines the best
execution plan, taking into account factors like data indexing,
query complexity, and resource utilization.
Techniques for Optimization
• Indexing: Creating indexes on frequently accessed
columns to speed up searches.
• Normalization: Organizing data into tables to reduce
redundancy and dependency.
• Partitioning: Dividing a table into smaller parts to
improve access times.
• Caching: Storing frequently accessed data in memory for
quick retrieval.
Optimization ensures that databases perform efficiently, even
as data grows.
5. Tables and Views
In an RDBMS, Tables and Views are fundamental components
for organizing and displaying data:
a) Tables
A Table is a structured format that organizes data into rows
and columns. Each row represents a record, while each
column represents an attribute. Tables are central to the
relational model, enabling data to be stored and related
efficiently.
b) Views
A View is a virtual table generated by a query. It doesn’t store
data physically but provides a way to present data from one
or more tables in a customized format. Views are beneficial
for:
• Simplifying complex queries.
• Enhancing security by providing access to specific data
without exposing entire tables.
• Hiding complexity from users.
6. Entity
An Entity is an object, person, place, or concept about which
data is stored. Entities represent real-world objects in the
database, such as students, books, or courses. Entities are
stored as rows within tables, with each row representing a
unique instance of the entity.
Types of Entities
• Strong Entity: An entity that can exist independently and
has a primary key. For example, a "Department" entity.
• Weak Entity: An entity that cannot exist without being
associated with another entity. For example, a
"Dependents" entity, which relies on an "Employee"
entity.

7. Types of Entity
Entities in databases are categorized based on their
relationships and dependencies. The main types include:
• Strong Entity: Represents objects that exist
independently. For example, “Customer” is a strong
entity because it has unique data attributes like
Customer ID.
• Weak Entity: Depends on a strong entity and lacks
sufficient attributes to form a primary key. Weak entities
often inherit attributes from related strong entities.
Each entity type plays a role in defining relationships and
dependencies in a database.
8. Weak Entity Attributes
A Weak Entity does not have a unique identifier (primary key)
of its own and instead relies on a related entity for
identification. Weak entities contain partial keys (attributes
that uniquely identify it within the context of its associated
entity) and foreign keys to link it to a strong entity.
For example, a “Dependents” entity may lack a unique
identifier and depend on an “Employee” entity. Its attributes
might include a partial key like “Dependent ID” combined
with “Employee ID.”

9. Entity Sets
An Entity Set is a collection of similar entities. For example,
the “Student” entity set contains all records of students. Each
entity within a set shares common attributes, and the set
defines the scope of data an entity can hold.
Entity sets are crucial in structuring data in an organized
manner, ensuring that all entities are grouped by shared
characteristics.

10. Entity–Relationship Diagrams (ER Diagrams)


An Entity–Relationship Diagram (ERD) visually represents the
relationships between entities in a database. It helps in
designing a database by showing entities, attributes, and
relationships clearly.
Components of an ER Diagram
• Entities: Represented by rectangles.
• Attributes: Represented by ovals connected to entities.
• Relationships: Represented by diamonds, showing
connections between entities.
• Cardinality: Describes the number of instances of one
entity that can be associated with instances of another
entity (e.g., one-to-one, one-to-many).
ER diagrams are fundamental in database design, as they
provide a blueprint for data organization and relationships.

You might also like