MM 1
MM 1
Other Benefits
Faster application development
Flexibility in modifying the database
Enforces organization-wide data standards
Provides up-to-date information
Reduces overall cost through shared resources
Main Characteristics of the Database Approach
The DBA is responsible for managing the entire database system. Key duties include:
Database Designers:
Database designers decide what data should be stored and how to organize it. Their tasks include:
End users are individuals who interact with the database system to retrieve, modify, or generate
reports based on the stored data. They access the database through applications or directly via query
languages.
Definition:
The Three-Schema Architectureis a framework used in database systems to separate the users
viewof the database from the physical storageof data. It defines three levels of abstraction: internal,
conceptual, and external, and helps achieve data independenceand efficient database management.
Mappings:
Mappingsconnect the three levels and handle the transformation of data and queries between
them:
External ↔ Conceptual
Conceptual ↔ Internal
Enable data independence:
Logical data independence: Changes in conceptual schema dont affect user views.
Physical data independence: Changes in physical storage dont affect conceptual schema.
Data Independence:
Data Independenceis the ability to modify the schema at one levelof a database system without
affecting the schema at the next higher level.
It ensures that changes in storage or logical structure do not require changes in the application
programsor user views.
Definition:
The capacity to change the conceptual schemawithout requiring changes to the external schemasor
application programs.
Key Points:
Definition:
The capacity to change the internal schemawithout needing to change the conceptual schemaor
external schemas.
Key Points:
The DBMS consists of various componentsthat interact with each other to manage and process data
efficiently. These components are grouped into two levels:
This includes modules responsible for processing queries, managing data, and ensuring transaction
safety:
(d) Precompiler
Executes:
Privileged commands
Optimized query plans
Canned transactions with parameters
Works with:
System catalog(updates statistics)
Stored data managerfor actual data access
Main memory buffersfor managing data transfer
Concurrency controland backup &recovery systemsfor transaction safety
Uses operating system I/O servicesfor reading/writingdata between disk and memory.
Handles low-level data accessoperations.
Types of Attributes
Composite Attributes
These can be divided into smaller subparts, each with independent meaning.
Example:
Address→ Street_address, City, State, Zip
Street_address→ Number, Street, Apartment_number
This forms a hierarchy of attributes.
The value of a composite attribute is a combinationof its sub-attributes.
Single-Valued Attributes
These have only one valuefor a particular entity.
Example: Ageof a person.
Multivalued Attributes
These can have multiple valuesfor a single entity.
Example:
Stored Attributes
These are values directly storedin the database.
Example: Birth_Dateof an employee.
Derived Attributes
These are calculatedfrom stored attributes.
Example:
Value is unknown
Value is not applicable
5. Complex Attributes
Cardinality Ratio
The cardinality ratiodefines the maximum number of relationship instancesthat an entity can
participate in with another entity.
1:1– One entity in A relates to one entity in B (e.g., each department has one manager, and
each manager manages one department).
1:N– One entity in A relates to many in B (e.g., one department has many employees, but each
employee belongs to one department).
N:1– Many in A relate to one in B (reverse of 1:N).
M:N– Many in A relate to many in B (e.g., employees can work on multiple projects, and
projects can have multiple employees).
In ER diagrams, these are represented with numbers (1, N, M) on the lines connected to the
relationship diamond.
The participation constraintdefines the minimum numberof relationship instances an entity must
participate in. It shows whether the existenceof an entity depends on being related to another.
Types of Participation:
Total Participation:
Every entity mustbe involved in the relationship.
Example: Every employee must work for a department.
Shown with a double linein ER diagrams.
Partial Participation:
Together:
1. Data Dictionary
Think of it as the "map of the database"that helps users and DBMS understand whats inside.
2. Weak Entity
A weak entityis an entity that cannot be identified on its own. It depends on another entity (called the
owner) to be uniquely identified.