Syllabus Topics:
- Lecture:
- Introduction to DBMS
- Basic Database Terminology
- Types of DBMS: Relational, Object-Relational, and NoSQL Databases
- Introduction to MySQL
- MySQL Clients (Monitor, Shell, Workbench)
- Lab:
- Using MySQL Monitor, Shell, and Workbench
Lecture Notes (In-Depth)
1. Introduction to DBMS
A Database Management System (DBMS) is specialized software designed to manage databases, enabling efficient storage, retrieval, updating, and management of data. It acts as an intermediary between users/applications and the database, ensuring data is organized, secure, and accessible.
- Purpose of DBMS:
- Data Management: Organizes data in a structured manner (e.g., tables in RDBMS).
- Data Integrity: Enforces constraints (e.g., primary keys, foreign keys) to maintain accuracy.
- Concurrency Control: Allows multiple users to access data simultaneously without conflicts.
- Security: Manages access through authentication and authorization (e.g., GRANT/REVOKE).
- Backup and Recovery: Ensures data is recoverable in case of failures.
- Advantages:
- Reduces data redundancy and inconsistency.
- Provides data independence (logical and physical).
- Supports complex queries for data retrieval.
- Facilitates scalability and performance optimization.
- Examples:
- Relational: MySQL, PostgreSQL, Oracle.
- NoSQL: MongoDB, Cassandra, Redis.
2. Basic Database Terminology
Understanding key terms is essential for working with databases:
- Database: An organized collection of data, typically stored and accessed electronically. Example: A "school" database containing student and course information.
- Table: A structure within a database that organizes data into rows (records) and columns (attributes). Example: A
students
table with columns student_id
, name
, age
.
- Row/Record/Tuple: A single entry in a table. Example:
(1, 'John Doe', 20)
in the students
table.
- Column/Attribute: A specific property of a table. Example:
name
or age
in the students
table.
- Primary Key: A unique, non-null identifier for each record in a table. Example:
student_id
in students
.
- Foreign Key: A column in one table that references the primary key of another table, establishing a relationship. Example:
course_id
in an enrollments
table referencing courses.course_id
.
- Schema: The logical structure of a database, defining tables, relationships, and constraints.
- Query: A request to retrieve, insert, update, or delete data (e.g.,
SELECT * FROM students;
).