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

Database Management System Overview

A Database Management System (DBMS) is essential for storing, organizing, and retrieving data, ensuring accuracy and preventing data loss. Database design and normalization are crucial for maintaining data integrity and reducing redundancy, while various types of databases and relationships help structure data effectively. The role of a Database Administrator (DBA) includes managing users, performance, and security to ensure data availability.

Uploaded by

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

Database Management System Overview

A Database Management System (DBMS) is essential for storing, organizing, and retrieving data, ensuring accuracy and preventing data loss. Database design and normalization are crucial for maintaining data integrity and reducing redundancy, while various types of databases and relationships help structure data effectively. The role of a Database Administrator (DBA) includes managing users, performance, and security to ensure data availability.

Uploaded by

morenochristy020
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

DATABASE MANAGEMENT (Notes 1)

WHAT IS DATABASE MANAGEMENT SYSTEM??

 Database Management System (DBMS) is a Software that stores, organizes,


retrieves, and protects data.

Why is it important?

 Prevents data loss


 Ensures accuracy
 Speeds up data access
 Supports multiple users

Significance of DBMS in Data Management

 Manages huge amounts of data


 Secures confidential information
 Maintains data consistency
 Supports business operations
 Enables quick decision-making
➡ Everyday examples: hospitals, banks, schools, social media

Roles of a Database Administrator (DBA)

A DBA is responsible for:

 Installing & configuring the database


 Managing users & security
 Monitoring performance
 Backup & recovery
 Ensuring data availability
“Silent heroes working even at 2 AM.”

What Is a Database?

A database is:

 An organized collection of data


 Structured into tables
 Managed by a DBMS (like Oracle)
Examples:

 Student records
 Banking transactions
 Employee information

Types of Databases

1. Hierarchical – tree structure


2. Network – multiple connections
3. Relational (RDBMS) – tables & relationships (Oracle)
4. Object-Oriented – stores objects
5. NoSQL – for massive, unstructured data

Theoretical Aspects of a Database


• Data models (ERD, relational model)
• Rules and constraints
• Relationships (PK, FK)
• Table design
“Think of it as the blueprint.”
Physical Aspects of a Database
• Actual storage files
• Memory allocation
• Disk structures
• Indexes
• Backup files
1
DATABASE MANAGEMENT (Notes 1)
“This is the real, behind-the-scenes machinery.”
Quick Review
• DBMS = manages data
• DBA = manages the DBMS
• Database = organized collection of data
• Types of databases = Hierarchical, Network, RDBMS, Object-Oriented,NoSQL
• Theoretical vs Physical = blueprint vs actual structure

RDBMS (Relational Database Management System)


 is a database system that stores data in tables — rows and columns — and connects those
tables using relationships (primary keys and foreign keys).
In simple terms:
RDBMS = organized tables + relationships + accuracy.

ORDBMS (Object-Relational Database Management System)


o is a database system that combines the structure of tables with the flexibility of object-
oriented features.
In simple terms:
ORDBMS = tables + objects + modern, flexible data handling.

Key Differences

THE DATA MODEL: BASIC BUILDING BLOCKS OF DATABASE

What is a Data Model?

• It is a visual representation or blueprint that organizes data elements and their relationships,
showing how data is stored, managed, and used.
• Blueprint of the database
Describes structure and connections
Guides database creation in Oracle

Fundamental Components

 Entities
- a thing, place, person or object that is independent of another.
-Things we store data about.

Examples:
• Student
• Teacher
• Course
• Product

Attributes

Definition: It is a characteristic or property of an entity, which is represented as a column in a


table.

2
DATABASE MANAGEMENT (Notes 1)
- Characteristics of an entity
Examples:
• StudentID, Name, Grade
• ProductID, Price, Category

Relationships

Definition: is a logical connection between two or more tables in a relational database,


established through shared data like a primary key in one table and a foreign key in another.

- Connections between entities


Examples:
• Student enrolls in Course
• Teacher teaches Class

Functions of a Data Model

• Provides structure
• Brings clarity
• Aids communication among developers
• Guides database design process

Why Data Models Matter

• Reduce confusion
• Prevent design errors
• Foundation for Oracle database implementation

Summary

Entities = the nouns


Attributes = the details
Relationships = the connections
Data model = the blueprint

WHAT IS DATABASE DESIGN?

 Database Design is the process of planning, organizing, and structuring data before building a
database.
 Process of planning data organization
Importance of Database Design

 Easier data access


 Maintains data integrity
 Supports scalability
 Prevents chaos and inconsistency

Schema Design
 It is the blueprint for organizing data in a database, defining tables, fields, data types,
relationships (like primary/foreign keys), and constraints to ensure data integrity, efficiency, and
scalability for applications.
Schema = Database Blueprint

Includes:
• Tables
• Fields
• Data types
• Primary keys
• Relationships

What is table?
 A table is the basic structure of a database where data is stored in rows and columns.
3
DATABASE MANAGEMENT (Notes 1)

What is field?
 A field is a single piece of information stored in a table.
It represents one attribute or characteristic of an entity in a database.
In simpler words:
“A field is a column in a table that holds a specific type of data.”

What are data types?


They define the nature of the data, such as:
• Numbers (like 123 or 45.67)
• Text (like names or addresses)
• Dates and times (like 2025-12-08 or 10:30 AM)
• Logical/Boolean values (like TRUE or FALSE)
• Binary data (like images or files)
Example:

📌 COMMON DATA TYPES & EXAMPLES

1. Number Types
 Stores numeric values (whole or decimal)
Examples:
• NUMBER(6) → 123456
• NUMBER(5,2) → 123.45
• INTEGER → 100
Use case: Student ID, Salary, GPA

2. Text / Character Types


• Stores letters, words, or strings
• Examples:
• CHAR(1) → 'M' or 'F'
• VARCHAR2(50) → “Andrea Santos”
• CLOB → Long text (like essays)
Use case: Student Name, Address, Email

3. Date & Time Types


• Stores dates, times, or both
• Examples:
• DATE → 2007-04-12
• TIMESTAMP → 2007-04-12 10:30:00
Use case: Birthdate, Enrollment Date
4
DATABASE MANAGEMENT (Notes 1)

4. Boolean / Logical Types


• Stores TRUE/FALSE values
• Example:
• IsEnrolled = TRUE
• IsGraduated = FALSE
Use case: Student Active Status

5. Binary Types
• Stores files or binary objects
• Examples:
• BLOB → Images, PDF files, Videos
• RAW → Small binary data
Use case: Student photo, scanned IDs

WHAT IS A PRIMARY KEY?

 A Primary Key (PK) is a unique identifier for each record in a table.


 It makes sure no two rows are exactly the same.
 Every record must have a value in the primary key.
 No NULLs are allowed.

Think of a student ID number in school.


• Two students might have the same name.
• Two students might have the same birthdate.
• But no two students share the same StudentID.
That’s exactly what a primary key does in a database table.

 Primary Key = StudentID


 It uniquely identifies each student.

WHAT IS A RELATIONSHIP?

In a database, a relationship defines how two tables are connected.

• It shows how records in one table relate to records in another table.


• Relationships help the database organize, link, and retrieve data efficiently.
• Without relationships, tables are just lonely islands of information.
Think of it as friendships or connections in real life: some are one-to-one, some one-to-many, some
many-to-many.

TYPES OF RELATIONSHIPS

1. One-to-One (1:1)

• Each record in Table A relates to exactly one record in Table B.


• Rare in real life, but used for things like personal profiles.
Example: Table: Students → Table: StudentPassport

Each student has exactly one passport.


2. One-to-Many (1:N)

• Each record in Table A relates to many records in Table B.

• Most common type of relationship.

Example:

• Table: Teachers → Table: Courses


5
DATABASE MANAGEMENT (Notes 1)
• One teacher can teach many courses.

3. Many-to-Many (M:N)

• Records in Table A relate to many records in Table B, and vice versa.


• Usually implemented with a junction table.
Example:

• Table: Students → Table: Courses via Enrollments


• One student can enroll in many courses.
• One course can have many students.

DATABASE NORMALIZATION

• Database normalization is the process of organizing the attributes of the database to reduce
or eliminate data redundancy (having the same data but at different places).
• Eliminating redundancy in tables
Normalization aims to:

• Eliminate redundancy
• Make data consistent and reliable
• Prevent weird, embarrassing errors called anomalies

Why do we need Normalization?

• The primary objective for normalizing the relations is to eliminate the below anomalies. Failure
to reduce anomalies results in data redundancy, which may threaten data integrity and cause
additional issues as the database increases. Normalization consists of a set of procedures that
assist you in developing an effective database structure.

Insertion Anomalies:

• Insertion anomalies occur when it is not possible to insert data into a database because the
required fields are missing or because the data is incomplete. For example, if a database
requires that every record has a primary key, but no value is provided for a particular record, it
cannot be inserted into the database.

Deletion anomalies:

• Deletion anomalies occur when deleting a record from a database and can result in the
unintentional loss of data. For example, if a database contains information about customers and
orders, deleting a customer record may also delete all the orders associated with that customer.

Updation anomalies:

• Updation anomalies occur when modifying data in a database and can result in inconsistencies
or errors. For example, if a database contains information about employees and their salaries,
updating an employee’s salary in one record but not in all related records could lead to incorrect
calculations and reporting.

NORMAL FORMS IN DBMS

1NF — First Normal Form

⭐ Rule Reminder:

A table is in 1NF if:


✔ No repeating groups
✔ No multivalued cells (isang value lang dapat bawat cell)
✔ Each record is unique

❌ NOT in 1NF

6
DATABASE MANAGEMENT (Notes 1)

The ContactNumbers column contains two values in one cell.


Ayaw ng 1NF ng ganyang “siksikan sa isang cell.”

✅ In 1NF (Correct Version)

2NF — Second Normal Form

⭐ Rule Reminder:

A table is in 2NF if:


✔ No partial dependency — meaning no non-key attribute should depend on only part
of a composite primary key
Keyword: Composite key (two-column primary key)
❌ NOT in 2NF

👉 Primary Key: (StudentID, CourseID)


(Combined, they uniquely identify each row.)

Where’s the violation?

• StudentName depends ONLY on StudentID,


NOT on CourseID.
• That means StudentName is partially dependent on the composite key.
And 2NF hates partial dependency the way teachers hate last-minute submissions.

Split the table into two:

• StudentName depends on StudentID


• Enrollment only tracks the many-to-many relationship
• No partial dependency

3NF — Third Normal Form


⭐ Rule Reminder:
A table is in 3NF if:
✔ No transitive dependency
(non-key attribute must NOT depend on another non-key attribute)
In short:
Every non-key attribute must depend ONLY on the primary key — nothing else.
❌ NOT in 3NF (Problem Example)

7
DATABASE MANAGEMENT (Notes 1)

Where’s the violation?


• StudentID → Section
• Section → Adviser
• Therefore: StudentID → Adviser (indirectly)
• This is a transitive dependency, which 3NF absolutely forbids.
✅ In 3NF (Correct Version)
Traditional File System Database System
Split the table into two:
Data processing is file-by-file. Data processing uses SQL and a
If a program needs information, DBMS.
it must open the entire file and The system retrieves only what you
search through it manually. need.

• Slow • Fast queries


• Repetitive • Optimized indexing
• Inefficient • No unnecessary scanning
Like reading the whole Like typing a name in the
Now: class list just to find one computer and instantly finding
absent student.
• Adviser depends directly on Section
• Section depends directly on StudentID
No attribute is depending on another non-key attribute in the same table

Example:

• Parang gusto mong malaman kung crush ka ng crush mo.


Pero hindi mo siya matanong nang direkta.

So ang nangyayari:
Ikaw → Tatanong kay Bestfriend → Siya ang magtatanong kay Crush → Siya ang magbibigay ng
sagot
👉 Ang sagot ay hindi galing direkta sa source — dumaan pa sa ibang tao.
That’s transitive dependency.

📚 FILE SYSTEM DATA PROCESSING

• File System Data Processing means using programs to manage, read, write, update,
and store data within individual files on a storage device, like a hard drive, organizing them in
directories (folders).

What is traditional file system?

• A traditional file system is the classic method of storing and managing data in a computer by
using separate, individual files, usually organized in folders.

What is database system?

• It is a structured way of storing, managing, and retrieving data using a Database


Management System (DBMS).

Contrast: Traditional File Systems vs. Database Systems (In Terms of Data Processing)

Imagine two schools:

•One uses old filing cabinets.


•The other uses a modern digital registry.
Both store data… but how they process that data? Worlds apart.

1. How Data Is Accessed

8
DATABASE MANAGEMENT (Notes 1)

File System Database System

Backups and recovery depend on the A DBMS supports:


user.
If a file gets corrupted? • automatic backups
• crash recovery
Well… may the odds ever be in your • transaction rollback
favor. Mistakes can be reversed like a “Ctrl + Z”
for data.

2. How Data Is Updated

3. How Data
FileIsSystem
Shared Database System

Every program keeps its own data One update affects all related
files. components because data lives in a
So when you update information centralized database.
(e.g., student address), you must
update: • Update once
• Everywhere else stays
• enrollment file consistent
• grades file • No duplicates to chase
• attendance file
If you forget one, you breed
4. How Data Is Protected

File System Database System


Sharing is limited and risky. Multiple users can process data
If two users open the same file, simultaneously.
corruption can happen.
It’s like having two teachers • Controlled access
writing on the same attendance • Transaction management
• Locking mechanisms
sheet at the same time — chaos.
Everyone works together smoothly
without messing each other up.

5. How Data Errors Are Handled

File System Database System

Security is basic. Security is fine-grained.


You can lock or protect the whole
You can control:
file, but…
• which tables a user sees
• No control at field-level
• which rows they can view
• Anyone with access sees
• which columns they can edit
everything
Much tighter and safer.
Feature Imagine giving a student access
Traditional to
File Database System
the entire grade book just because
they need one score. 9
DATABASE MANAGEMENT (Notes 1)
System

Data Access Manual scanning Fast SQL queries

Updates Many files updated Centralized updates

Sharing Limited, risky Multi-user support

Security Basic Detailed control

Recovery Weak Strong, automated

Processing Slow Optimized

Problems Associated with File Systems


1. Data Redundancy
Files love to copy themselves. The same data gets stored in multiple places, again and again, like
gossip that won’t die. Result? Wasted storage and mismatched information when one copy changes and
the others don’t.

2. Data Inconsistency
Because of redundancy, data starts telling different stories. Update a student’s address in one file but
not in another—suddenly, the system doesn’t know where the student lives. Awkward. And dangerous
for decision-making.

3. Difficulty in Accessing Data


Want a specific report? Too bad. File systems weren’t built for flexible questions. You often need a new
program just to retrieve data in a slightly different way. That’s not efficiency—that’s busywork.

4. Data Isolation
Data is scattered across different files and formats. Each file minds its own business. Putting
information together from multiple files feels like herding cats—possible, but exhausting.

5. Integrity Problems
Rules like “grades must be between 0 and 100” or “ID numbers must be unique” are hard to enforce. In
file systems, these rules live in application programs—if they exist at all. One forgotten rule, and chaos
slips in quietly.

6. Security Problems
File systems offer only basic security. Fine-grained control? Who can see what, edit what, or delete
what? Good luck. It’s either all or nothing—like giving everyone the same key to the house.

7. Atomicity Problems
When something goes wrong mid-operation—power failure, system crash—file systems can leave data
half-written. The transaction is neither fully done nor fully undone. That’s not philosophy; that’s a
problem.

8. Concurrent Access Anomalies


Two users updating the same file at the same time? One overwrites the other, and nobody knows
whose data survived. Collaboration turns into a silent duel.

9. Poor Backup and Recovery


Backups are often manual and inconsistent. Recovery is slow and uncertain. When disaster strikes, file
systems don’t exactly rise like a phoenix—they limp back, if at all.

10
DATABASE MANAGEMENT (Notes 1)
The Bottom Line

File systems worked when data was small, users were few, and questions were simple. But today’s
world demands precision, speed, and reliability. This is why Database Management Systems
(DBMS) exist—to fix what file systems simply can’t.

11

Common questions

Powered by AI

A Relational Database Management System (RDBMS) processes data using SQL queries and a DBMS, allowing for optimized indexing and fast queries. This means that users can retrieve exactly what they need without unnecessary scanning . In contrast, a traditional file system requires accessing files individually, necessitating opening and searching through entire files manually, which is slow and inefficient . Moreover, RDBMS supports centralized updates and multi-user processing with controlled access, avoiding data redundancy and enabling safe collaboration . In contrast, traditional file systems face issues like data redundancy and consistency problems due to multiple files needing separate updates, limited sharing causing risks like data corruption, and lack of fine-grained security or automatic backups .

RDBMS handles data complexity through structured tables and relationships using primary and foreign keys, ensuring data integrity and support for ACID properties, which is suitable for applications requiring transactional integrity . ORDBMS enhances this by integrating object-oriented features, offering additional data handling flexibility through support for complex data types and integrating methods that allow data manipulation reflecting real-world entities and programming language capabilities . NoSQL databases, however, provide the highest flexibility as they accommodate unstructured or semi-structured data without schema constraints, supporting diverse applications and massive, dynamic datasets typical in big data and real-time analytics. Nonetheless, this comes at the expense of traditional data consistency due to eventual consistency models prevalent in NoSQL systems .

Data models play a crucial role in communication among database developers by providing a visual representation or blueprint of data elements and their relationships . By defining entities, attributes, and relationships clearly, data models help developers understand the structure and constraints of the database, facilitating collaboration and ensuring a shared understanding of the database design . They aid in preventing design errors by reducing confusion and misunderstandings that could lead to poor database performance or inconsistency. Additionally, they serve as a foundation for detailed database design, ensuring that the implementation aligns with the intended real-world processes and relationships .

Primary keys and foreign keys establish relationships within databases by serving as unique identifiers for records and connecting tables. A primary key uniquely identifies each record within its table, ensuring data integrity by prohibiting duplicate and null entries . A foreign key, on the other hand, is a field in one table that uniquely identifies a row of another table or the same table, establishing a link between the tables. These relationships are essential as they enable efficient data navigation, enforce referential integrity, and provide a mechanism to connect and organize data across tables, reflecting real-world associations and ensuring consistent data updates . Without these relationships, databases would become disjointed islands of information, lacking coherence and the ability to efficiently retrieve related information .

NoSQL databases offer several advantages in managing unstructured data: they can handle large volumes of rapidly changing data, provide scalability across distributed systems, and allow for flexible schema designs, which are ideal for applications like social media, big data, or real-time web apps . However, disadvantages include lack of consistency in transactions, which can compromise data integrity. They often forego the ACID properties (Atomicity, Consistency, Isolation, Durability) in favor of performance and scalability, leading to potential difficulties in maintaining data reliability and consistency in certain applications . NoSQL's diverse types, like document, key-value, column-family, and graph, also mean that choosing the right model for a specific use case can be complex .

Database normalization is critical because it organizes attributes to eliminate or reduce data redundancy, thus maintaining consistency and reliability of the data. It prevents anomalies like insertion, update, or deletion anomalies, which can lead to data inconsistencies or errors . Normalization ensures that data dependencies are logical, which enhances data integrity and supports efficient database performance by organizing data into tables that reduce redundancy and dependency . It serves as a foundational procedure that aids in developing effective database structures, avoiding errors and improving database scalability and maintenance .

Object-Relational Database Management Systems (ORDBMS) enhance modern database functionality by combining traditional table structures of RDBMS with object-oriented features . This combination allows for more flexible data handling, enabling the use of complex data types such as objects, which can encapsulate both data attributes and behavior. ORDBMS supports inheritance, data abstraction, and encapsulation, which are crucial for applications that require the manipulation of complex data and relationships, such as computer-aided design and multimedia applications . This flexibility reinforces the capability of databases to model real-world entities more accurately and supports applications that RDBMS cannot efficiently handle due to its strict tabular format .

Schema design acts as a "blueprint" for creating a database by defining how data is organized and structured before actual database construction. Its key components include tables, fields, data types, primary keys, and relationships such as primary/foreign keys and constraints to ensure data integrity, efficiency, and scalability . By laying out the framework for how data is categorized, connected, and accessed, schema design guides the database's physical construction and operational utilization. It ensures that the database accurately reflects real-world entities and their attributes, supports consistent data input and retrieval, and facilitates future adjustments or scaling .

A Database Administrator (DBA) plays a crucial role in the optimal functioning of a Database Management System (DBMS) by being responsible for installing and configuring the database, managing users and ensuring security, monitoring performance, and handling backup and recovery processes . By ensuring data availability and system consistency, the DBA helps to prevent data loss, maintain data integrity, and ensure that the system operates smoothly under multiple user accesses . Their roles in performance monitoring and security oversight also protect confidential information and enhance the speed and accuracy of data access, essential for supporting business operations and decision-making .

Database backup and recovery processes are vital for data protection, ensuring that data can be restored in case of loss, corruption, or system failure. In database systems, DBMS supports automatic backups, crash recovery, and transaction rollback, providing robust mechanisms to reverse mistakes and recover efficiently from failures . This automated and integrated functionality contrasts with traditional file systems where backup and recovery are manual processes, often leading to inconsistent backups and slow recovery times . This distinction highlights the reliability and resilience of database systems compared to file systems, which may leave data integrity vulnerable during recovery scenarios .

You might also like