Week 2
Teaching and Learning Methods to be Employed
1. Illustrated lecture on DBMS architecture with layered diagrams
2. Lab session: Navigating MySQL Workbench schemas, tables, users
3. Demonstration: Data independence in practice
Learning Outcomes / Objectives
By the end of this week, students should be able to:
1. Identify and describe the components of a database system.
2. Explain the functions of a DBMS.
3. Describe the three-schema (ANSI/SPARC) architecture.
4. Distinguish between physical and logical data independence.
5. Explain the roles of DBA, database designer, and end-users.
2.4 Database Languages
DBMS provides several languages for interacting with the database:
1. Data Definition Language (DDL) — Defines the database structure. Commands: CREATE, ALTER, DROP, TRUNCATE
2. Data Manipulation Language (DML) — Manipulates data. Commands: SELECT, INSERT, UPDATE, DELETE
3. Data Control Language (DCL) — Controls access. Commands: GRANT, REVOKE
4. Transaction Control Language (TCL) — Manages transactions. Commands: COMMIT, ROLLBACK, SAVEPOINT
SQL (Structured Query Language) is the industry-standard language that combines DDL, DML, DCL, and TCL into one integrated language. It is used by virtually all relational DBMS products.
Database Roles and People
|
Role |
Responsibilities |
|
Database Administrator (DBA) |
Responsible for the overall health of the database — installation, configuration, performance tuning, security, backup/recovery, user management. |
|
Database Designer |
Designs the structure of the database — identifies entities, relationships, attributes, and constraints. |
|
Application Developer |
Builds applications that use the database. Writes SQL queries and application code. |
|
Naive End User |
Uses applications (like a bank teller's terminal) without knowing SQL or the database structure. |
|
Sophisticated End User |
Directly queries the database using SQL (e.g., a data analyst at Access Bank). |
Reading List / References
Connolly, T. & Begg, C. (2015). Database Systems, Chapters 2 & 3: Database Architecture. Pearson.
Silberschatz, A. et al. (2020). Database System Concepts, Chapter 1: Overview. McGraw-Hill.
ANSI/X3/SPARC Study Group on DBMS (1975). Interim Report. FDT Bulletin, 7(2).
Activities
|
Self-Assessment Quiz: 1. Name the FIVE components of a database system. 2. What is the difference between the external and conceptual schema in the three-schema architecture? 3. Define physical data independence and give an example. 4. What is the difference between DDL and DML? Give ONE command from each. |
|
Lab Exercise: Install MySQL Workbench (or use an online SQL tool like SQLFiddle). Create a new schema called 'university_db'. Create a simple STUDENT table with columns: student_id (INT, PRIMARY KEY), first_name (VARCHAR 50), last_name (VARCHAR 50), department (VARCHAR 50), level (INT). Insert 5 sample student records. Screenshot your work for submission. |