1 of 18

Unit 1: Introduction to Database Systems & E‑R Models

Prepared By: Mr. Akshay D. Thorat

2 of 18

What is a Database?

​

  • Structured collection of logically related data

​

  • Supports efficient storage, retrieval, and manipulation

​

  • Eliminates redundancy and inconsistencies

​

  • Foundation of modern information systems

3 of 18

Limitations of File-Based Systems

​

  • Data redundancy

​

  • Data inconsistency

​

  • Poor security

​

  • No concurrency control

​

  • Difficult backup & recovery

​

  • Tight coupling between programs and data

4 of 18

Advantages of DBMS

​

  • Centralized control

​

  • Data integrity & consistency

​

  • Concurrent access

​

  • Data abstraction

​

  • Backup & recovery

​

  • Reduced application development time

5 of 18

Database System Applications

​

  • Banking & Finance

​

  • Telecom & Networking

​

  • Healthcare & Medical Records

​

  • Education & LMS

​

  • E‑commerce & Retail

​

  • Government & Public Services

6 of 18

DBMS Architecture Overview

​

  • Users: DBA, Developers, End Users

​

  • DBMS Engine: Query processor, storage manager

​

  • Database: Actual stored data

​

  • Ensures efficient interaction between users and data

7 of 18

Three-Level Architecture

​

  • Physical Level: Storage structure, indexing

​

  • Logical Level: Schema, relationships

​

  • View Level: User-specific views

​

  • Supports logical & physical data independence

8 of 18

Database Languages

​

  • DDL: CREATE, ALTER, DROP

​

  • DML: SELECT, INSERT, UPDATE, DELETE

​

  • DCL: GRANT, REVOKE

​

  • TCL: COMMIT, ROLLBACK, SAVEPOINT

9 of 18

Relational Database Concepts

​

  • Based on Codd’s relational model

​

  • Data stored in tables (relations)

​

  • Tuple: Row

​

  • Attribute: Column

​

  • Domain: Allowed values

​

  • Schema vs Instance

10 of 18

Codd’s 12 Rules (Overview)

  • Information Rule
  • Guaranteed Access Rule
  • Systematic Treatment of Nulls
  • Active Online Catalog
  • Comprehensive Data Sublanguage
  • View Updating Rule
  • High-Level Insert, Update, Delete
  • Physical Data Independence
  • Logical Data Independence
  • Integrity Independence
  • Distribution Independence
  • Non-subversion Rule

11 of 18

ER Model – Introduction

​

  • Conceptual data modeling technique

​

  • Represents real-world entities and relationships

​

  • Helps in designing database structure

​

  • Used during requirement analysis

12 of 18

Entity Types

​

  • Strong Entity: Has primary key

​

  • Weak Entity: Depends on another entity

​

  • Attributes:
    • Simple

​

    • Composite

​

    • Derived

​

    • Multi-valued

13 of 18

Relationship Types

​

  • Unary: Relationship within same entity

​

  • Binary: Between two entities

​

  • Ternary: Among three entities

​

  • Degree: Number of participating entities

14 of 18

Mapping Cardinality

​

  • 1:1 – One entity ↔ One entity

​

  • 1:N – One entity ↔ Many entities

​

  • N:1 – Many entities ↔ One entity

​

  • M:N – Many entities ↔ Many entities

​

  • Determines foreign key placement

​

15 of 18

Keys in ER Model

​

  • Super Key: Uniquely identifies a tuple

​

  • Candidate Key: Minimal super key

​

  • Primary Key: Chosen candidate key

​

  • Foreign Key: References another table

​

  • Partial Key: Used in weak entities

16 of 18

Extended ER Model

​

  • Generalization: Combining entities into a superclass

​

  • Specialization: Dividing entity into subclasses

​

  • Aggregation: Treating relationship as an entity

​

  • Composition: Strong ownership relationship

17 of 18

ER Diagram Notations

​

  • Rectangles → Entities

​

  • Ovals → Attributes

​

  • Diamonds → Relationships

​

  • Double ovals → Multi-valued attributes

​

  • Dashed ovals → Derived attributes

​

  • Double rectangles → Weak entities

18 of 18

Converting ER Diagrams to Tables

​

  • Convert entities → tables

​

  • Convert attributes → columns

​

  • Convert relationships → foreign keys

​

  • Handle:
    • Composite attributes → multiple columns

​

    • Multi-valued attributes → separate tables

​

    • Weak entities → include owner’s key