Chapter 1 - Introduction To DB
Chapter 1 - Introduction To DB
What is a Database?
A database is a collection of related data. This data can be stored in various formats, such as an
indexed address book or on a hard drive using software like Microsoft Access or Excel.
This collection of related data with an implicit meaning ( )معنى ضمنيis a database.
Definition
Example: In a university file system, student records are stored in text files. If
two students are mistakenly assigned the same ID, the system won’t flag it,
leading to potential errors when processing grades or attendance.
5. All or Nothing:
Ensuring all parts of a transaction are completed (or none at all) is difficult, increasing the
risk of incomplete data updates.
Example: ولكن النظام تعطل، إذا كان المستخدم يحاول حجز تذكرة الطيران وقام بالدفع،في نظام حجز التذاكر
. فقد يحدث أن يتم خصم المبلغ دون تأكيد الحجز،)قبل إتمام العملية بالكامل (مثًال قبل تحديث حالة الحجز في الملف
وبالتالي تتعرض البيانات لحالة غير متسقة، لم يحدث الحجز بشكل كامل،في هذا المثال.
6. Security Issues:
Managing who has access to which data becomes complex in a file-based system, making
it harder to enforce security measures or track actions.
7. Limited Data Sharing:
Most file-based systems restrict file access to a single user at a time, hindering
collaboration and real-time data access.
Example: In a small business, two employees may need to update the same
inventory file at the same time. In a file-based system, only one can access
the file, while the other has to wait, slowing down work.
8. Disaster Recovery:
Without proper backup and recovery mechanisms, the system is vulnerable to data loss
during hardware or software failures.
Database management system (DBMS) نظام إدارة
قواعد البيانات
A Database Management System (DBMS) is a collection of programs that helps users create and
manage a database. It provides general-purpose software functionalities, including:
1. Defining a Database:
This means specifying the types of data, how it is structured, and the rules for the data
(constraints). The information about the database structure is stored in the DBMS as
metadata (data about data), often in a catalog or dictionary.
Example: A DBA in a hospital ensures only authorized staff can access patient
records.
2. Database Designers
Role and Responsibilities:
Identify and structure data.
Engage with users to gather requirements.
Develop tailored views for different user groups.
User Interfaces
Naive End Users: Minimal training; interact through user-friendly interfaces for standard
transactions.
Casual Users: Learn a few features for occasional use.
Sophisticated Users: Learn most features of the DBMS for complex requirements.
Standalone Users: Proficient in specific software packages.
Application Programmers