Detailed explanation of the Database Model and Architecture, along with examples, suitable for
exams and practical understanding.
1. DATABASE MODEL
Definition:
A Database Model defines the logical structure of a database and how data can be stored, organized,
and manipulated. It determines how data is connected and how it can be accessed.
Types of Database Models:
1.1 Hierarchical Model
Structure: Tree-like; parent-child relationship.
Data Access: One-to-many (1:N).
Example: Organization chart (CEO → Managers → Employees).
plaintext
Department
|
Employee
Example Use Case: IBM’s IMS (Information Management System).
1.2 Network Model
Structure: Graph-like; supports many-to-many (M:N) relationships.
Data Access: More flexible than hierarchical.
Example:
plaintext
Course ---< Enrolls >--- Student
Example Use Case: CODASYL DBMS.
1.3 Relational Model (Most Common)
1/5
Structure: Data is stored in tables (relations) with rows and columns.
Key Concept: Uses keys (primary, foreign) and SQL for querying.
Example:
Student Table
Roll No Name Age
1 Raj 20
2 Priya 21
Marks Table
Roll No Subject Marks
1 Math 85
Example Use Case: MySQL, PostgreSQL, Oracle.
1.4 Object-Oriented Model
Structure: Based on real-world objects, combining data and operations.
Supports: Inheritance, encapsulation.
Example:
java
class Student {
int roll;
String name;
}
Example Use Case: DBMSs like db4o, ObjectDB.
1.5 Entity-Relationship Model
Structure: Represents data as entities, attributes, and relationships.
Used In: Database design (before actual implementation).
2. DATABASE ARCHITECTURE
Definition:
Database architecture refers to the design and structure of a database system, including how users
interact with the database, how data flows, and how components are arranged.
2/5
Types of DBMS Architecture:
✅ 2.1 Single-Tier Architecture
Definition: User directly interacts with the database.
Example: File-based systems, MS Access.
Limitation: Not scalable, security issues.
✅ 2.2 Two-Tier Architecture
Structure:
Tier 1: Client (User Interface).
Tier 2: Database Server (Processes Queries).
Communication: Application uses APIs like ODBC or JDBC.
Example:
plaintext
[Client App] <----> [DB Server]
Use Case: Small enterprise apps.
✅ 2.3 Three-Tier Architecture
Structure:
Tier 1: Presentation Layer (UI/Client).
Tier 2: Application Layer (Business Logic).
Tier 3: Data Layer (Database).
Advantages:
Better scalability
Security and maintainability
Example:
plaintext
[Browser] <-> [Web Server] <-> [Database Server]
Use Case: Web applications (like Online Banking, E-commerce).
3/5
✅ 3-Level ANSI-SPARC Database Architecture
This is a conceptual model to separate user views from physical data storage.
3 Levels:
1. External Level (View Level)
Defines user-specific views of the database.
Users see only the data they need.
2. Conceptual Level (Logical Level)
Describes what data is stored and relationships.
DB Admins manage this level.
Independent of physical implementation.
3. Internal Level (Physical Level)
Describes how data is stored on storage devices (indexes, records, file structures).
plaintext
[User View]
↓
[Conceptual Schema]
↓
[Physical Storage]
✅ Example Putting It All Together:
Imagine an Online Library System:
Database Model:
Uses Relational Model:
Books(BookID, Title, AuthorID)
Authors(AuthorID, Name)
Borrowers(BorrowerID, Name)
Transactions(TransactionID, BorrowerID, BookID, Date)
4/5
Database Architecture:
Uses Three-Tier Architecture:
Client: Web app for users to search/borrow books.
Middle tier: Server with business logic (availability check, login, return dates).
DB Server: Stores books and transactions.
5/5