



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




A database is a collection of related data stored in an organized way so it can be easily accessed, managed, and updated. A Database Management System (DBMS) is software used to: Store data Retrieve data Modify data Manage large amounts of information Example: School records, bank systems, hospital databases
Traditional file systems have problems like: Data redundancy (duplicate data) Data inconsistency Poor security
Avoids duplication of data Saves storage space
Ensures same data is updated everywhere
Multiple users can access data simultaneously
Follows uniform format and rules
Access control using passwords & permissions
Ensures accurate and valid data
2. Data Models A data model defines how data is stored and organized.
Data stored in tables (rows & columns) Most widely used
Data stored as records connected by links
Data organized in a tree structure
3. Relational Model (Important) Proposed by E.F. Codd (1970)
Data stored in tables Each row = record Each column = attribute
All possible keys that can become primary key
Candidate key not selected as primary key
Links one table to another 👉 Example: Student ID → Primary Key Class ID → Foreign Key 🔗 6. Referential Integrity Ensures relationships between tables remain valid.
Foreign key must match primary key Cannot delete referenced data Prevents invalid data entry
Cascade Delete → Deletes related data automatically Cascade Update → Updates related data automatically
7. Introduction to MySQL MySQL is an: Open-source RDBMS Uses SQL language
Fast and reliable Free to use Supports large data
8. SQL (Structured Query Language) Used to: Create database Retrieve data Modify data 9. Types of SQL Commands
Used to define structure Commands: CREATE ALTER DROP
Used to modify data Commands: INSERT UPDATE DELETE SELECT