Database system

Database System Architecture
  • Components of Database System Architecture:

    • DML (Data Manipulation Language) - Used to manipulate data stored in the database.

    • DDL (Data Definition Language) - Used to define and manage all database objects.

    • DBMS (Database Management System) - A software package that interacts with the user, applications, and the database to capture and analyze data.

    • Database - A collection of interrelated data or files.

    • Meta-Data - Data about data; describes the structure and constraints of the data.

    • Schema - The blueprint of the database; defines how data is organized.

    • Software Modules - Components that perform specific functions within the DBMS.

    • View of Data - How the data is perceived and displayed for users.
      &nbs;

Definition of DBMS
  • A Database Management System (DBMS) is a collection of interrelated data and a set of programs to access and manipulate that data.

Objectives of DBMS
  • Provide efficient data management that includes:

    • Storage and retrieval of information.

    • Management of large bodies of information:

    • Defining structures for data storage.

    • Providing mechanisms for data manipulation.

    • Ensuring safety and integrity of information stored.

    • Avoiding anomalies during multi-user access.

Purpose of Databases
  • Facilitate better management and access of data compared to file systems:

    • **Limitations of File Systems: **

    • Data redundancy and inconsistency.

      • Redundancy: Duplication of information across files.

      • Inconsistency: Different copies of the same data may vary.

    • Difficulty accessing data, requiring new programs for each task.

    • Data isolation, as files may be in different formats and scattered.

    • Integrity problems, with consistency constraints enforced in program code.
      &nbs;

Drawbacks of Using File Systems
  • Atomicity of updates: Updates may lead to inconsistent database states (e.g., partial updates).

  • Concurrent access: Multiple users accessing data simultaneously can cause inconsistencies.

  • Security: Not all users need access to all data; database systems manage user access.
    &nbs;

View of Data in a Database
  • Users receive an abstract view of data, hiding underlying storage details.

  • **Levels of Data Abstraction: **

    • Physical Level: Details of how data is stored (low-level).

    • Logical Level: What data is stored in the database and the relationships between them.

    • View Level: A simplified version of the database structure visible to users.
      &nbs;

Data Models
  • Definition: A data model is a collection of conceptual tools for describing:

    • Data

    • Data relationships

    • Data semantics (meanings)

    • Consistency constraints

  • Types of Data Models:

    1. Relational Model: Uses tables to represent data and relationships.

    2. Entity-Relationship (E-R) Model: Focuses on entities and their relationships (e.g., customers, accounts).

    3. Object-based Data Model: Data represented as objects.

    4. Other Models: Includes network and hierarchical models.

Database Users and Administrators
  • Database Users: Individuals interacting with the database.

  • Database Administrators (DBAs): Responsible for the overall management of the DBMS, including:

    • Schema definition and integrity constraints.

    • Storage structure and access method.

    • Granting user access and ensuring routine maintenance.


      &nbs;

Transaction Management
  • Transaction: A collection of operations performing a single logical function (e.g., money transfer).

Properties of Transactions:

  • Atomicity: Transaction must complete all operations or none.

  • Consistency: Final state must be valid after a transaction.

  • Durability: Changes are permanent even in case of a failure.
    &nbs;

Application Architectures
  • Database systems are primarily accessed through two client-server models:

    1. Two-Tiered Architecture: Application divided between client and server. Client directly invokes the database server with queries.

    2. Three-Tiered Architecture: Client acts as a front-end without direct database access, communicating through an application server.

Instances and Schemas
  • Instance of a Database: The current state of the database at a certain moment.

  • Schema of Database: The overall design and structure of the database, described at physical and logical levels (Physical Schema and Logical Schema).