← All study guidesSTUDY GUIDE

Database Systems Overview – study guide

A concise revision sheet covering DBMS types, relational model, algebra, normalization forms, SQL basics, and key concepts like ACID and integrity constraints.

Qwi helps you study

📚 Database Systems Overview

#DBMS #Architecture
80 % of enterprise DBMS are relational
SQL‑92 became ANSI standard
DBMS = software that stores, retrieves, and manages data while enforcing integrity and security.

DBMS Types

  • Centralized
  • Client‑Server
  • Distributed
  • Cloud‑based

Key Components

  • Storage manager
  • Query processor
  • Transaction manager
  • Recovery manager
CentralizedClient‑Server
Data locationSingle serverMultiple clients
ScalabilityLimitedHigh
Network loadLowHigher
Typical useSmall orgsEnterprises
Tip: Sketch an ER diagram before converting to relational tables – it prevents missing foreign keys.
Data Independence – logical vs. physical separation.
SQL DDL/DML – CREATE, INSERT, SELECT, UPDATE, DELETE.
Transactions – ACID properties ensure reliability.
  • DBMS abstracts storage details.
  • Client‑Server scales better than centralized.
  • Use ER modeling to capture relationships.
  • Maintain integrity with constraints.
01

🔗 Relational Model & Algebra

#Relational #Algebra
PK = unique, non‑null
FK = referential integrity
Relation = a set of tuples with a fixed schema (attributes).

Unary Operations

  • SELECT – filter rows
  • PROJECT – choose columns

Binary Operations

  • JOIN – combine tables
  • DIVISION – “all‑of” queries
  1. Identify entities & attributes.
  2. Define primary keys.
  3. Convert relationships to foreign keys.
  4. Apply normalization (1NF‑3NF).
Common traps:
  • Omitting foreign‑key constraints.
  • Using NULL in primary keys.
  • Mis‑interpreting JOIN direction.
  • Forgetting to project only needed columns.
  • Violating referential integrity during updates.
SELECT – σ (selection).
PROJECT – π (projection).
JOIN – combine related tuples.
  • Relations are sets of tuples.
  • Primary keys guarantee uniqueness.
  • Foreign keys enforce relationships.
  • Algebraic ops map directly to SQL.
02

🧩 Normalization & SQL Basics

#Normalization #SQL
1NF = atomic values
3NF = no transitive deps
Normalization = process of organizing tables to reduce redundancy and improve integrity.
Normal FormRequirement
1NFAtomic attributes, no repeating groups.
2NF1NF + no partial dependency on a composite PK.
3NF2NF + no transitive dependencies.
BCNFEvery determinant is a candidate key.
Tip: Declare UNIQUE and NOT NULL constraints early to enforce 1NF/2NF rules automatically.

Sample Questions

  • What SQL clause enforces referential integrity? FOREIGN KEY
  • Convert a many‑to‑many relationship into tables. Add junction table with two FKs
  • Which normal form eliminates transitive dependencies? 3NF
  • Write a SELECT that returns only distinct values. SELECT DISTINCT …
  • How to create a stored procedure in SQL? CREATE PROCEDURE … BEGIN … END
Procedures – encapsulate reusable SQL blocks.
Functions – return a value, can be used in expressions.
Triggers – fire on INSERT/UPDATE/DELETE events.
  • Normalization removes redundancy.
  • SQL DDL defines schema; DML manipulates data.
  • Procedures & functions improve modularity.
  • Use constraints to enforce integrity automatically.
03