Comprehensive Study Notes on Database Management
Comprehensive Study Notes on Database Management
Table of Contents
3. Data Independence
5. DBMS Architecture
2. Concept of Keys
o Candidate Key
o Primary Key
o Foreign Key
4. Relational Algebra
o ER Diagrams
o Functional Dependencies
o Nested Queries
1. Introduction to FoxPro
3. Operations in FoxPro
6. Case Studies
o Payroll Processing
A Database Management System (DBMS) is software that manages databases efficiently and
provides users with a systematic way to create, retrieve, update, and manage data.
Complexity Simple but inefficient for large data More complex but efficient
Logical Data Independence: The ability to change the logical structure without affecting
applications.
Physical Data Independence: The ability to change the physical storage without affecting
the logical structure.
A DBA (Database Administrator) is responsible for managing and maintaining the database.
Responsibilities of a DBA
Database Design and Implementation
Data Security and Authorization
Backup and Recovery Management
Performance Monitoring
Three-Tier Architecture
| | |
|________External Level________|
Conceptual Level
Contents
Table names, attributes, data types
Constraints (Primary Key, Foreign Key)
Indexes, Views
The Relational Model represents data as tables (relations) where each row is a record (tuple)
and each column is a field (attribute).
Example:
What is Normalization?
Normalization is the process of organizing data to reduce redundancy and improve data
integrity in a relational database.
Functional Dependencies
A functional dependency (FD) exists when one attribute uniquely determines another.
Notation: If A → B, then knowing A means we can determine B.
Example:
102 Pencil 3
Converted to 1NF:
101 Pen 5
101 Book 2
102 Pencil 3
Must be in 1NF
No partial dependency (No attribute should depend on only part of the primary key)
Converted to 2NF:
Order Table
101 P1
101 P2
Product Table
Product_ID (PK) Product_Name Supplier
Must be in 2NF
No transitive dependency (A non-key attribute should not depend on another non-key
attribute)
Converted to 3NF:
Student Table
Course Table
CSE101 DBMS
CSE102 OS
101 OS Chess
Student-Course Table
101 DBMS
101 OS
Student-Hobby Table
101 Chess
101 Music
SQL Commands
SELECT Course, COUNT(*) FROM Students GROUP BY Course HAVING COUNT(*) > 5;
INSERT INTO Students (Student_ID, Name, Age) VALUES (101, 'Alice', 22);
Update Data (UPDATE)
Nested Queries
FoxPro is a relational database management system (RDBMS) used for data processing,
management, and programming.
Creating a Database
Creating a Table
Inserting Data
Searching Records
Sorting Records
Indexing
Updating Records
Report Generation
Payroll Processing
Summary