Introduction to Databases and Database Users
Outline of Database Fundamentals
Types of Databases and Database Applications: Explores the evolution from traditional to modern applications.
Basic Definitions: Fundamental terminology used throughout the text.
Typical DBMS Functionality: The core operations and capabilities of database software.
Example of a Database (UNIVERSITY): A practical illustration of entities and relationships.
Main Characteristics of the Database Approach: Distinctive features that separate databases from file-processing systems.
Database Users: Different roles involved in the database environment.
Advantages of Using the Database Approach: Benefits in efficiency, security, and maintenance.
When Not to Use Databases: Specific scenarios where a DBMS may be suboptimal.
Types of Databases and Database Applications
Traditional Applications:
Numeric and Textual Databases: Focused on structured data consisting of numbers and characters.
More Recent Applications:
Multimedia Databases: Handling images, audio, and video content.
Geographic Information Systems (GIS): Managing spatial and geographical data.
Data Warehouses: Large-scale data repositories for analysis and decision-making.
Real-time and Active Databases: Databases that respond to events and operate under strict timing constraints.
Structure of Study: The primary focus of the initial parts of the course is on traditional applications, with advanced topics covered in specialized chapters (Chapters , , , , and ).
Basic Definitions
Database: A collection of related data.
Data: Known facts that can be recorded and have an implicit meaning.
Mini-world: Also known as the Universe of Discourse (UoD), this represents some part of the real world about which data is stored in a database (e.g., student grades and transcripts at a university).
Database Management System (DBMS): A software package/system designed to facilitate the creation and maintenance of a computerized database. Its primary functions include:
Defining: Specifying data types, structures, and constraints.
Constructing: Storing the data on a storage medium.
Manipulating: Querying and updating the data.
Sharing: Facilitating access by multiple users.
Database System: The combination of the DBMS software and the data itself. In some contexts, this also includes the application programs.
Typical DBMS Functionality
Definition: Specifying the database in terms of data types, structures, and constraints.
Construction/Loading: Creating the initial database contents on a secondary storage medium.
Manipulation:
Retrieval: Querying data and generating reports.
Modification: Performing insertions, deletions, and updates to the content.
Access: Supporting access through various channels, such as Web applications.
Processing and Sharing: Managing concurrent users and programs while ensuring data remains valid and consistent.
Protection and Security: Implementing measures to prevent unauthorized access and data breaches.
Active Processing: Taking internal actions automatically based on the state of the data.
Presentation and Visualization: Methods for displaying data in meaningful ways.
Maintenance: Managing the database, software, and systems over their entire lifetime.
Example of a Database: UNIVERSITY Environment
Mini-world Entities:
STUDENTs
COURSEs
SECTIONs (specific instances of courses)
DEPARTMENTs (academic units)
INSTRUCTORs
Mini-world Relationships:
SECTIONs are associated with specific COURSEs.
STUDENTs take specific SECTIONs.
COURSEs have prerequisite COURSEs.
INSTRUCTORs teach SECTIONs.
COURSEs are offered by DEPARTMENTs.
STUDENTs major in DEPARTMENTs.
Conceptual Data Model: These entities and relationships are typically expressed using models such as the ENTITY-RELATIONSHIP (ER) model.
Instance Data Examples (Figure )
COURSE Table:
Intro to Computer Science | | Credit Hours | CS Department
Data Structures | | Credit Hours | CS Department
Discrete Mathematics | | Credit Hours | MATH Department
Database | | Credit Hours | CS Department
SECTION Table:
Section ID | | Fall | Instructor King
Section ID | | Fall | Instructor Chang
GRADE_REPORT Table:
Student Number | Section ID | Grade
Student Number | Section ID | Grade
PREREQUISITE Table:
Course | Prerequisite
Course | Prerequisite
Main Characteristics of the Database Approach
Self-Describing Nature:
The DBMS contains a catalog that stores a description of the database (structures, types, constraints).
This description is known as meta-data.
This allows the DBMS to be general-purpose software capable of working with many different applications.
Insulation Between Programs and Data:
Known as program-data independence.
Data structures and storage organizations can be changed without requiring changes to the application programs that access the data.
Data Abstraction:
Uses a data model to hide physical storage details from users.
Provides a conceptual view of the data.
Support of Multiple Views:
Different users may require different perspectives on the data.
A view describes only the data relevant to a specific user or group.
Sharing and Multi-user Transaction Processing:
Allows concurrent retrieval and updates.
Concurrency Control: Ensures transactions are executed correctly or aborted to maintain consistency.
Recovery Subsystem: Ensures that completed (committed) transactions are permanently recorded.
OLTP (Online Transaction Processing): Supports hundreds of concurrent transactions per second.
Database Users
Actors on the Scene
Database Administrators (DBA): Responsible for authorizing access, coordinating use, monitoring performance, and acquiring hardware/software resources.
Database Designers: Responsible for defining content, structure, constraints, and transactions. They interface with end-users to understand requirements.
End-users: The people who require access to the database for querying, reporting, and updating.
Casual: Access the database occasionally for different information each time.
Naïve or Parametric: Use "canned transactions" (well-defined, repetitive functions). Examples: bank tellers, reservation clerks.
Sophisticated: Business analysts, scientists, and engineers who are highly familiar with system capabilities and often use software packages to interact with the data.
Stand-alone: Maintain personal databases using ready-to-use packages (e.g., an address book or tax software).
Workers Behind the Scene
This category includes individuals who design and develop the DBMS software, develop tools for the DBMS, and work as computer system operators.
Advantages of Using the Database Approach
Controlling Redundancy: Reducing duplicated data to save storage and simplify maintenance.
Data Sharing: Global access across the organization.
Restricting Unauthorized Access: Implementing security protocols.
Persistent Storage for Program Objects: Bridging the gap between programming language objects and database records (found in Object-Oriented DBMSs).
Efficient Query Processing: Providing structures like indexes for faster data retrieval.
Backup and Recovery: Ensuring data is not lost in the event of a system failure.
Multiple User Interfaces: Providing different ways to interact with data based on user skill level.
Representing Complex Relationships: Handling intricate linkages between data points.
Enforcing Integrity Constraints: Ensuring data follows specific business rules.
Drawing Inferences/Actions: Utilizing deductive and active rules to trigger logic.
Enforcing Standards: Standardizing item names, formats, and report structures.
Reduced Development Time: Lowering the time required to deploy new applications.
Flexibility: Allowing the database structure to evolve as requirements change.
Current Information: Providing real-time data for transaction systems (e.g., airline reservations).
Economies of Scale: Consolidating resources to avoid departmental waste.
Historical Development of Database Technology
Early Models ( – ): Hierarchical and Network models were dominant. A significant portion of legacy processing still uses the hierarchical model.
Relational Model ( – Present): Introduced by E.F. Codd in . Relational DBMS products began emerging in the early .
Object-Oriented Models (Late – Early ): Designed for complex data (CAD/CAM). These led to Object-Relational DBMSs (ORDBMSs) as traditional vendors incorporated object concepts.
The Web and E-commerce:
HTML pages with links.
XML (eXtended Markup Language) for data exchange.
Scripting languages (PHP, JavaScript) for dynamic, database-driven web pages.
When Not to Use a DBMS
Investment and Overhead Costs:
High initial hardware and software investment.
Overhead for security, concurrency control, and recovery.
Unnecessary Scenarios:
Simple, well-defined applications not expected to change.
Strict real-time requirements that cannot tolerate DBMS processing overhead.
Single-user environments where sharing is not required.
Modeling Limitations:
If the DBMS cannot handle the data complexity or lacks necessary specialized operations.
مقدمة عن قواعد البيانات
قواعد البيانات هي مجموعة من البيانات المرتبطة معًا بطريقة منظمة.
الهدف من قواعد البيانات هو تخزين، إدارة، واسترجاع المعلومات بشكل فعال.
التعريفات الأساسية
قاعدة البيانات: مجموعة من البيانات ذات الصلة.
البيانات: الحقائق المعروفة والتي يمكن تسجيلها وتحتوي على معنى ضمني.
نموذج بيانات: يمثل كيفية تنظيم البيانات بشكل منطقي.
نظام إدارة قواعد البيانات (DBMS): برنامج يساعد في إنشاء وصيانة قواعد البيانات.
التعريف: تحديد أنواع البيانات، الهياكل، والقيود.
البناء: تخزين البيانات على وسائط التخزين.
المعالجة: استرجاع وتحديث البيانات.
وظائف نظام إدارة قواعد البيانات
البناء/التحميل: إنشاء محتويات قاعدة البيانات على وحدة التخزين.
المعالجة:
استرجاع: استعلام البيانات وإنتاج التقارير.
تعديل: إجراء عمليات الإدخال، الحذف، والتحديث.
الأمان والحماية: تنفيذ تدابير لمنع الوصول غير المصرح به.
الصيانة: إدارة قاعدة البيانات، البرمجيات، والأنظمة طوال فترة استخدامها.
أنواع قواعد البيانات
قاعدة البيانات العددية والنصية: تركز على البيانات المنظمة.
قاعدة البيانات المتعددة الوسائط: تتعامل مع الصور، الصوت، والفيديو.
نظم المعلومات الجغرافية (GIS): إدارة البيانات المكانية والجغرافية.
قواعد بيانات البيانات الضخمة: مستودعات بيانات واسعة للتحليل وصنع القرار.
خصائص نهج قاعدة البيانات
الطبيعة الذاتية: تحتوي DBMS على كتالوج يصف قاعدة البيانات.
عزل البرامج عن البيانات: يمكن تغيير هياكل البيانات دون الحاجة لتغيير البرامج.
الأمان: تقييد الوصول غير المرخص والتحكم في البيانات.
مستخدمو قاعدة البيانات
مدراء قاعدة البيانات (DBA): مسؤولون عن الوصول والتنسيق.
مصممو قواعد البيانات: يقومون بتعريف المحتوى والهياكل.
المستخدمون النهائيون: يحتاجون للوصول إلى البيانات للاستعلام والتقارير.
مستخدمو قواعد البيانات العارضون: يقومون بالوصول العرضي.
فوائد استخدام النهج القائم على قاعدة البيانات
تقليل التكرار: تقليل البيانات المكررة.
مشاركة البيانات: الوصول العالمي عبر المؤسسة.
الاسترجاع السريع: توفير هياكل مثل الفهارس.
مرونة: السماح بتغيير بنية قاعدة البيانات مع تغير المتطلبات.
متى لا تستخدم قاعدة البيانات
في حالات الاستثمارات العالية والأعباء غير الضرورية.
عند وجود احتياجات زمنية صارمة لا يمكن تصحيحها عبر أنظمة إدارة قواعد البيانات.
في البيئات الأحادية حيث لا حاجة للمشاركة.