Chapter1

Chapter 1: Introduction

  • Author: Dr. Zahra Nematzadeh

  • Source: Database System Concepts, 7th Ed. ©Silberschatz, Korth and Sudarshan

Outline

  • Database-System Applications

  • Purpose of Database Systems

  • View of Data

  • Database Languages

  • Database Design

  • Database Engine

  • Database Architecture

  • Database Users and Administrators

Database Systems

  • Definition: A database is a collection of data that describes the activities of one or more related organizations.

  • Example: A university database contains information about entities such as:

    • Students

    • Faculty

    • Courses

    • Classrooms

  • Relationships among entities include student enrollment, faculty teaching, and room usage.

  • Database Management System (DBMS):

    • A software for managing and maintaining collections of interrelated data.

    • Provides an environment for convenient and efficient data access.

    • Alternatives to DBMS: Storing data in files with application-specific coding.

Database Administrator (DBA)

  • Roles:

    • Designing and implementing databases

    • Managing database performance

    • Implementing security measures

    • Creating backup and recovery strategies

    • Troubleshooting issues

    • Managing user access and permissions

Database Applications

  • Utilization: Database systems manage large and valuable collections of data, accessed by multiple users.

  • Complexity Management via Abstraction: Abstracts complexities making it easier for users to manage data efficiently.

Examples of Database Applications

  • Enterprise Information:

    • Sales, Accounting, Human Resources, Manufacturing,

  • Banking and Finance:

    • Customer and account information, transactions

  • Universities:

    • Registration and grades

  • Airlines and Telecommunications:

    • Reservations, call records

  • Web-Based Services:

    • Online retailers, navigation systems

Purpose of Database Systems

  • Challenges with Traditional File Systems:

    • Need for multiple programs for data handling

    • Data redundancy and inconsistency due to multiple file copies

    • Difficulty accessing data and implementing updates

    • Data isolation and integrity problems

    • Security issues from unauthorized access

Data Models

  • Definition: Tools for describing data, relationships, semantics, and constraints.

  • Types of Data Models:

    • Relational Model

    • Entity-Relationship Data Model

    • Object-Based Models

    • Semi-Structured Models (XML)

Relational Model

  • Structure: Data stored in tables (relation).

    • Each table consists of rows (records) and columns (attributes).

Example of a Relational Database

  • Instructor Table:

    • ID, name, dept_name, salary

  • Department Table:

    • dept_name, building, budget

Levels of Abstraction

  • Physical Level: Describes how data is actually stored.

  • Logical Level: Describes what data are stored and relationships.

  • View Level: Simplified user views, hiding complexity of the database.

Transaction Management (ACID Properties)

  • Atomicity: Transactions must complete fully or not at all.

  • Consistency: Ensures correctness of the database.

  • Isolation: Transactions operate independently.

  • Durability: Changes must persist post-transaction.

Database Engine

  • Components:

    • Storage Manager: Handles data storage, retrieval, and updates.

    • Query Processor: Converts queries into actions to retrieve data efficiently.

    • Transaction Manager: Ensures consistency during transactions.

Database Architecture

  • Comprises three levels:

    • Naive Users: Simple interfaces

    • Application Programmers: Develop application programs

    • Database Administrators (DBA): Manage database operations and performance.

Types of Database Users

  • Naive Users: Interact with predefined interfaces.

  • Application Programmers: Write programs for database interaction.

  • Sophisticated Users: Use query languages or tools for data analysis.

  • DBA: Oversee database design, storage structure, access control, and maintenance.

Database Applications Architecture

  • Two-Tier Architecture: Client directly communicates with the database server.

  • Three-Tier Architecture: Client communicates with an application server, which interacts with the database server, improving security and performance.

Questions

  • Q1: What prevents two students from registering for the last seat in a course?

    • Answer: The transaction manager prevents both students from booking the last seat.

  • Q2: Which architecture is better for web applications?

    • Answer: Three-Tier Architecture, for improved security and manageability.

End of Chapter 1

  • This chapter provides foundational knowledge about database systems, their components, applications, and the purpose of using a database over traditional file systems.