ExitPrep

Home / Exit exam / Database Systems

Database Systems: exit exam notes

ER modeling, relational design, SQL, transactions, and recovery. Written for the exam in 8 chapters, about 50 minutes of reading in total, plus 63 practice questions to drill. Chapter 1 is below in full and free for everyone. The other chapters open with Premium.

Part of the Computer Science, Computer Science & Engineering, Software Engineering exit exam prep.

Chapters

  1. Introduction to Database Management System Free (9 min)
  2. Data Modeling – Using ER Model Premium (5 min)
  3. Relational Database Design Premium (12 min)
  4. Transaction Management Premium (5 min)
  5. Concurrency Control Premium (5 min)
  6. Query Processing and Optimization Premium (4 min)
  7. Database Recovery Techniques Premium (5 min)
  8. Database Security Premium (5 min)

Chapter 1: Introduction to Database Management System

1.1 What is a Database?

Data refers to raw, unprocessed facts and figures that by themselves carry little meaning. Data can be numbers, text, images, audio, or video. For example, 3.8 or "Abebe" alone is just data — it becomes information when we attach context: "Abebe has a GPA of 3.8."

A database is a very large, integrated, organized collection of related data stored electronically so it can be easily accessed, managed, and updated. It is used to maintain internal records, present data to clients on the web, and support commercial processes. Unlike a simple file or spreadsheet, a database enforces structure, rules, and relationships between data elements.

Formal definition: A shared, integrated collection of logically related data (and a description of this data) designed to meet the information needs of an organization.

Database Management System (DBMS): Software used to create, efficiently manage, and safely store large amounts of data over long periods.

Database System: DBMS + Database = Database System

Core focus of database systems: Organizing data, supporting multiple users, enabling efficient retrieval, ensuring secure/reliable storage, and maintaining consistent data.

PropertyDescription
PersistentData survives after the program that created it terminates
SharedMultiple users and applications can access the data concurrently
InterrelatedData items have logical connections (e.g., a student is enrolled in a course)
Self-describingThe database contains both data and metadata (the description/schema of the data)

1.2 The Evolution of Data Management

Data management has passed through three main stages:

  1. Manual Approach: Primitive filing cabinets with paper and cards.
    • Limitations: Highly prone to error, difficult to update/retrieve data, and nearly impossible to cross-reference or integrate information.
  2. Traditional File-Based Approach: Each application defined and managed its own separate data files.
    • Limitations: Limited data sharing, severe data redundancy (duplication), and update anomalies (errors during modification, deletion, or insertion of data).
  3. Database Approach: Data is organized logically as tables (relations) and shared throughout an organization.
    • Key feature: Separates data definition from the application — applications are not affected by changes to the underlying data structure (Data Independence).

1.3 Database vs. File System

ProblemFile SystemDatabase
Data RedundancySame data repeated in multiple filesData stored once, shared across applications
Data InconsistencyCopies may disagree after partial updatesSingle source of truth, consistency enforced
Data IsolationData scattered in different files/formatsCentralized with uniform access
Integrity IssuesHard to enforce constraints across filesIntegrity constraints defined in the schema
SecurityDifficult to control fine-grained accessRole-based access control built in
ConcurrencyNo built-in multi-user supportTransaction management with ACID properties

1.4 Types of Databases

  1. Relational (RDBMS): Tables with rows and columns — PostgreSQL, MySQL, Oracle.
  2. NoSQL: Document (MongoDB), key-value (Redis), column-family (Cassandra), graph (Neo4j).
  3. Object-Oriented: Data stored as objects.
  4. Distributed: Data spread across multiple physical locations on a network.
  5. Cloud: Hosted on cloud platforms (AWS RDS, Google Cloud SQL, Azure SQL).

1.5 DBMS and Its Components

A DBMS enables users to define, create, maintain, and control access to a database. It sits between users/applications and physical storage.

Key functions:

The 5 pillars:

ComponentDescription
HardwareServers, storage (HDD/SSD), RAM, network infrastructure
SoftwareDBMS engine, OS, application programs, network software
ProcedureRules for login, backups, failure handling, security policies
DataOperational data, metadata (data dictionary/system catalog), indexes
PeopleDBAs, designers, programmers, end users

1.6 Database Languages

LanguagePurposeExamples
DDL (Data Definition Language)Define/modify schemaCREATE TABLE, ALTER TABLE, DROP TABLE
DML (Data Manipulation Language)Query/modify dataSELECT, INSERT, UPDATE, DELETE
DCL (Data Control Language)Control access/permissionsGRANT, REVOKE
TCL (Transaction Control Language)Manage transactionsCOMMIT, ROLLBACK, SAVEPOINT

1.7 Benefits and Limitations

Benefits:

Limitations:

1.8 Database Development Life Cycle (DDLC)

Systematic process for designing, implementing, and maintaining a database (analogous to SDLC):

Requirements → Conceptual Design (ER) → Logical Design (Schema)
→ Physical Design (Storage) → Implementation → Testing → Operation & Maintenance

Phases:

  1. Planning / Requirements Collection & Analysis — identify stakeholders, gather data and functional requirements. Output: Requirements Specification Document.
    • Example (university): store students, courses, enrollments, generate transcripts.
  2. Analysis / Conceptual Design — ER modeling: entities, attributes, relationships, cardinality (1:1, 1:N, M:N). Output: ER Diagram.
  3. Logical Design — convert ER to relational schema, apply normalization (1NF–BCNF), define PKs/FKs/constraints.
    • ER mapping: strong entity → table; weak entity → table with owner's PK; 1:1 → FK on either side; 1:N → FK on N-side; M:N → junction table; multivalued attribute → separate table.
  4. Physical Design — storage structures, indexes (B-tree/hash), partitioning, DBMS product choice. Output: DDL scripts.
  5. Implementation — run DDL, develop apps/UIs, load/migrate data, set up security.
  6. Testing & Evaluation — verify requirements, performance, security, user acceptance.
  7. Operation & Maintenance — monitor, tune, backup, schema changes, upgrades.

1.9 Roles in Database Design and Use

RoleResponsibility
Database Administrator (DBA)Oversees resources, authorizes access, manages schema, security, backup/recovery, performance, capacity planning
Database Designer (DBD)Identifies what to store, chooses structures; logical designer produces ER/schema; physical designer handles indexes and storage
Systems AnalystBridge between users and dev team; gathers and documents requirements
Application ProgrammerWrites code/interfaces (Java, Python, etc.) that access the database via SQL or ORMs
End UsersAccess the database through applications or direct queries

End user types:

TypeDescriptionExample
Naive/CasualPredefined interfaces, no queriesStudent checking grades online
SophisticatedWrites own SQL queriesData analyst running reports
SpecializedCustom programs for complex needsGIS developer
Stand-alonePersonal database useResearcher using Access

1.10 Data Abstraction (Three-Schema Architecture)

The ANSI/SPARC architecture provides three levels of abstraction:

EXTERNAL LEVEL (User Views)
        ↓
CONCEPTUAL LEVEL (Logical Schema — entities, relationships, constraints)
        ↓
INTERNAL LEVEL (Physical Storage — files, indexes, record formats)
LevelAlso calledDescribes
External / ViewHighestHow specific users see the data; different views for different roles
Conceptual / LogicalMiddleWhat data is stored and how entities relate; DBMS-independent
Internal / PhysicalLowestHow data is stored and indexed on disk

Data Independence — modify a schema at one level without affecting the level above:

1.11 Database System Architecture

1. Centralized DBMS — software, hardware, and user interfaces on a single system with specialized servers (file, print, web, email). Simple but limited scalability.

2. Two-Tier Client-Server — UI and application on the client; DBMS on the server. Client connects via an API (e.g., ODBC) over the network.

3. Three-Tier Client-Server — best for web apps:

The client never directly accesses the database — adds security, data encryption, and scalability through load balancing.

4. Distributed Architecture — data across multiple sites, each with its own DBMS, coordinated globally. High availability and fault tolerance; challenges include consistency and distributed transactions.

1.12 Key Terms (Exit Exam)

TermMeaning
DataRaw, unprocessed facts
InformationProcessed, meaningful data
DatabaseOrganized collection of related data
DBMSSoftware for managing databases
SchemaStructure/blueprint of a database
InstanceData stored at a particular moment
MetadataData about data (system catalog)
DDL / DML / DCLDefinition / Manipulation / Control languages
Data IndependenceChange one schema level without affecting the level above
ANSI/SPARCThree-schema architecture standard
ER ModelEntity-Relationship model for conceptual design
NormalizationOrganizing data to reduce redundancy (1NF–BCNF)
ACIDAtomicity, Consistency, Isolation, Durability
7 more chapters in this course: Data Modeling – Using ER Model; Relational Database Design; Transaction Management; Concurrency Control; Query Processing and Optimization; Database Recovery Techniques; Database Security. They are part of Premium, from 200 ETB for 3 months, together with every past paper and unlimited practice.

Study Database Systems in the app

Read on your phone or laptop, drill the practice questions for this course and track what you got wrong. Free to start.

Start studying free Log in

All Computer Science courses, papers and practice