Było deszczowe sobotnie rano, gdy Jakub Wiśniewski wszedł do małej kawiarenki na ulicy Marszałkowskiej ze swoją czteroletnią córeczką Zosią. Na zewnątrz ulica lśniła od deszczu, a miarowy stukot kropel o szyby pasował do ciszy w głowie Jakuba.
Kiedyś był człowiekiem pełnym śmiechu i światła. Innowator w branży technologicznej, milioner przed trzydziestką, miał wszystko sukces, szacunek, a przede wszystkim miłość. Jego żona, Kinga, była sercem jego świata. Jej śmiech wypełniał ich dom, a jej dobroć łagodziła najtrudniejsze dni. Ale dwa lata temu zabrał ją wypadek samochodowy. Tak po prostu. Kolory zniknęły z jego życia.
Od tamtej pory Jakub stał się cichy. Nie zimny po prostu zdystansowany. Jedyną rzeczą, która trzymała go przy życiu, była mała dziewczynka obok niego.
Zosia była żywym portretem matki miękkie kasztanowe loki, jasne piwne oczy i ten sam sposób przechylania głowy, gdy była ciekawa. Nie rozumiała jeszcze w pełni, co straciła, ale w swoim dziecięcym sposób ciągnęła Jakuba przez żałobę.
Gdy usiedli przy stoliku przy oknie, Jakub sięgnął po menu z przyzwyczajenia. Naprzeciwko Zosia nuciła cichą melodię, bujając nóż# 1. Introduction to the Database System
## 1.1. File-based Approach and Its Limitations
**File-based Approach:**
– **Definition:** Data is stored in individual files, each designed for a specific application.
– **Characteristics:**
– Data redundancy: Same data may be duplicated across multiple files.
– Data inconsistency: Changes in one file may not reflect in others.
– Limited data sharing: Files are often tied to specific programs.
– Lack of data integrity: No mechanisms to enforce constraints.
**Limitations:**
– **Inflexibility:** Hard to adapt to new requirements.
– **Poor Data Control:** Difficult to manage security and access.
– **Isolation:** Data is scattered, making comprehensive analysis difficult.
## 1.2. Database Approach
**Definition:** A systematic way to organize, store, and retrieve data.
**Characteristics:**
– **Centralized:** Data is stored in a single repository.
– **Shared:** Multiple users and applications can access data simultaneously.
– **Controlled:** Managed by a Database Management System (DBMS).
**Advantages Over File-based Systems:**
– **Reduced Redundancy:** Data is stored once and referenced.
– **Improved Consistency:** Changes are reflected across all applications.
– **Enhanced Security:** Access controls are centralized.
– **Better Integrity:** Rules ensure data accuracy and reliability.
## 1.3. Components of the Database System Environment
1. **Hardware:** Servers and storage devices.
2. **Software:** DBMS, operating system, network software.
3. **Data:** The actual information stored.
4. **Procedures:** Rules for using and managing the database.
5. **People:** Database administrators, designers, end-users.
## 1.4. Database Management System (DBMS) and Its Roles
**Definition:** Software that interacts with users, applications, and the database to capture and analyze data.
**Roles:**
– **Data Definition:** Creating and modifying the database structure.
– **Data Manipulation:** Inserting, updating, deleting, and querying data.
– **Data Control:** Managing access and security.
– **Data Maintenance:** Backup, recovery, and performance tuning.
## 1.5. Advantages and Disadvantages of DBMS
**Advantages:**
– **Data Independence:** Changes in data structure dont affect applications.
– **Efficient Data Access:** Advanced querying capabilities.
– **Concurrent Access:** Multiple users can access data simultaneously.
– **Crash Recovery:** Mechanisms to restore data after failures.
**Disadvantages:**
– **Complexity:** Requires specialized knowledge to design and manage.
– **Cost:** Initial setup and maintenance can be expensive.
– **Performance Overhead:** DBMS operations may slow down simple tasks.
## 1.6. Data Models
**Definition:** Abstract models that describe how data is represented and accessed.
**Types:**
1. **Relational Model:** Data is organized into tables (relations).
2. **Entity-Relationship Model:** Focuses on entities and their relationships.
3. **Object-oriented Model:** Data is represented as objects.
4. **NoSQL Models:** Designed for unstructured or semi-structured data.
## 1.7. Three-Schema Architecture
**Purpose:** To separate user applications from the physical database.
**Layers:**
1. **External Schema (View Level):** How users see the data.
2. **Conceptual Schema (Logical Level):** Describes the structure of the whole database.
3. **Internal Schema (Physical Level):** Describes how data is stored physically.
**Benefits:**
– **Independence:** Changes in one layer dont affect others.
– **Customization:** Different views for different users.
## 1.8. Database Languages
1. **Data Definition Language (DDL):** Defines and modifies database structures (e.g., `CREATE`, `ALTER`).
2. **Data Manipulation Language (DML):** Manages data within structures (e.g., `INSERT`, `UPDATE`).
3. **Data Control Language (DCL):** Controls access (e.g., `GRANT`, `REVOKE`).
4. **Transaction Control Language (TCL):** Manages transactions (e.g., `COMMIT`, `ROLLBACK`).
## 1.9. Data Dictionary
**Definition:** A centralized repository of metadata (data about data).
**Functions:**
– Stores definitions of data elements.
– Records relationships among data.
– Maintains constraints and rules.
**Importance:**
– Ensures consistency and accuracy.
– Aids in database design and maintenance.
## 1.10. Database Users and Administrators
**Users:**
1. **End-users:** Interact with the database via applications.
2. **Application Programmers:** Develop applications that use the database.
3. **Sophisticated Users:** Write complex queries directly.
**Administrators:**
1. **Database Administrator (DBA):** Manages the DBMS, ensures performance, security, and availability.
– **Responsibilities:**
– Schema definition and modification.
– Granting and revoking access.
– Backup and recovery.
– Tuning performance.
## 1.11. Evolution of Database Systems
**Timeline:**
1. **1960s:** File-based systems.
2. **1970s:** Hierarchical and network databases.
3. **1980s:** Relational databases dominate.
4. **1990s:** Object-oriented databases emerge.
5. **2000s:** NoSQL databases for big data.
**Current Trends:**
– **Cloud Databases:** Hosted on cloud platforms.
– **Big Data Technologies:** Handling massive datasets.
– **AI Integration:** Using machine learning for data management.
## 1.12. Summary of Database System Concepts
– **Database Systems** overcome the limitations of file-based systems by providing centralized, controlled, and shared data access.
– **DBMS** acts as an intermediary between users and the database, offering various functionalities.
– **Three-Schema Architecture** ensures data independence and customization.
– **Database Languages** facilitate interaction with the database.
– **DBA** plays a crucial role in maintaining the database environment.
– **Evolution** reflects the growing complexity and demands of data management.



