قاعدة بيانات 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

3 ‫القواعد البيانات المحاضرة‬

Advantages, Disadvantages, Functions, and Components of a DBMS


Advantages of DBMS [1] Pages (26-28)
‫ ومكونات نظم إدارة قواعد البيانات‬، ‫ وظائف‬، ‫مزايا وعيوب‬
)26-28( ‫] الصفحات‬1[ ‫مزايا نظم إدارة قواعد البيانات‬

1. Control of data redundancy: Database approach controls the


amount of redundancy inherent in the database. However, the
database approach doesn't eliminate redundancy entirely. Why,
sometimes, is redundancy necessary?
‫ نهج قاعدة البيانات يتحكم في مقدار‬:‫ التحكم في التكرار البيانات‬.1
.‫ فإن نهج قاعدة البيانات ال يلغي التكرار تماما‬، ‫ ومع ذلك‬.‫التكرار الكامنة في قاعدة البيانات‬
‫ هو التكرار ضروري؟‬، ‫ في بعض األحيان‬، ‫لماذا‬

2. Data consistency: Eliminating or controlling redundancy reduces the


risk of inconsistencies.
.‫ القضاء أو السيطرة على التكرار يقلل من خطر عدم التناقضات‬:‫ اتساق البيانات‬.2
3. More information from the same amount of data: With the
integration of the operational data, it may be possible for the
organization to derive additional information from the same data. (See
the example [1] on page 27, “Contract and Sales department details").
‫ قد يكون‬،‫ مع إدماج البيانات التشغيلية‬:‫ – مزيد من المعلومات من نفس المبلغ من البيانات‬3
‫] في الصفحة‬1[ ‫ (انظر المثال‬.‫من الممكن أن تنظم المنظمة معلومات إضافية من نفس البيانات‬
.)"‫ "تفاصيل العقد والمبيعات‬،27
4. Sharing of Data: new applications can build on the existing data in
the database and add only data that is not currently stored, rather than
having to define all data requirements again.
4. ‫يمكن أن تساعدك التطبيقات الجديدة عىل البيانات الموجودة ف‬: ‫تقاسم البيانات‬
‫ بدل من وجودها لتحديد جميع‬،‫قاعدة البيانات وإضافة البيانات الت ل يتم تخزينها حاليا‬
‫متطلبات البيانات مرة أخرى‬.

5. Improved data integrity: Database integrity refers to the validity and


consistency of stored data. Integrity is usually expressed in terms of
constraints, which are consistency rules that the database is not
permitted to violate. For example, an integrity constraint could state
that a member of staff s salary cannot be greater than $40,000.
5. ‫يشي سالمة قاعدة البيانات إىل اتساق سلطة وسلطة المخزنة‬: ‫تحسي سالمة البيانات‬.
‫ وه قواعد التساق الت ل يسمح بها‬،‫وعادة ما يتم التعبي عن السالمة من حيث القيود‬
‫ يمكن أن يكون قيود الياهة أن الدولة ل يمكن‬،‫وعىل سبيل المثال‬. ‫قاعدة البيانات لنتهاك‬
‫ دولر‬40،000 ‫أن يكون رفيض المستوى من الراتب أكي من‬.

6. Improved security: Database security is the protection of the


database from unauthorized users. (See the examples [1] on page 27)
. ‫أمن قاعدة البيانات هي حماية قاعدة البيانات من المستخدمين غير المصرح به‬: ‫تحسين األمن‬.
()27 ‫ ]في الصفحة‬1( ‫انظر األمثلة‬
7. Increased concurrency: Many DBMSs manage concurrent database
access and ensure loss of information or even loss of integrity cannot
occur.
. ‫تدير العديد من نظم إدارة قواعد البيانات الوصول الميامن لقاعدة‬: ‫التامن المتايد‬
‫البيانات وضمان عدم فقد المعلومات أو حت فقدان التكامل‬.

Disadvantages of DBMS [1] Pages (29 and 30)


1. Complexity: The provision of the functionality we expect of a good
DBMS makes the DBMS an extremely complex piece of software.
)30 ‫ و‬29( ‫عيوب نظام إدارة قواعد البيانات لصفحات‬
1. ‫إن توفير الوظائف التي نتوقعها لنظام إدارة قاعدة بيانات جيد يجعل نظام إدارة‬: ‫التعقيد‬
‫قواعد البيانات جز ًءا من البرمجيات المعقدة للغاية‬.

2. Size: The complexity and breadth of functionality makes the DBMS


an extremely large piece of software, occupying many megabytes of
disk space and requiring substantial amounts of memory to run
efficiently.
2. ‫كبيرا للغاية من‬
ً ‫يجعل تعقيد الوظائف واتساع نطاقها نظام إدارة قاعدة البيانات جز ًءا‬: ‫الحجم‬
‫ ويشغل العديد من ميغابايت من مساحة القرص ويتطلب كميات كبيرة من الذاكرة‬، ‫البرامج‬
‫لتشغيلها بكفاءة‬.

3. Cost (software and hardware): The cost of DBMSs varies


significantly, depending on the environment and functionality provided.
ً ‫)تختلف تكلفة نظام إدارة قواعد البيانات اختالفًا‬: ‫التكلفة (البرامج واألجهزة‬
3. ‫ اعتمادًا‬، ‫كبيرا‬
‫على البيئة والوظائف المتوفرة‬.

4. Cost of Conversion: The cost of converting existing applications to


run on the new DBMS and hardware. This cost also includes the cost of
training staff to use these new systems, and possibly the employment
of specialist staff to help with the conversion and running of the
system. This cost is one of the main reasons why some organizations
feel tied to their current systems and cannot switch to more modern
database technology.
4. ‫تكلفة تحويل التطبيقات الحالية لتعمل على نظم إدارة قواعد البيانات‬: ‫تكلفة التحويل‬
‫تشمل هذه التكلفة أيضًا تكلفة تدريب الموظفين على استخدام هذه النظم‬. ‫واألجهزة الجديدة‬
‫هذه التكلفة‬. ‫ وربما توظيف موظفين متخصصين للمساعدة في تحويل النظام وتشغيله‬، ‫الجديدة‬
‫هي أحد األسباب الرئيسية لشعور بعض المنظمات باالرتباط بأنظمتها الحالية وال يمكنها التحول‬
‫إلى تكنولوجيا قواعد البيانات الحديثة‬.

5. Higher impact of a failure: The centralization of resources increases


the vulnerability of the system. Since all users and applications rely on
the availability of the DBMS, the failure of certain components can
bring operations to a halt.
5. ‫نظرا ألن جميع المستخدمين‬
ً . ‫مركزية الموارد تزيد من ضعف النظام‬: ‫التأثير العالي للفشل‬
‫ يمكن أن يؤدي فشل مكونات معينة إلى‬، ‫والتطبيقات تعتمد على توفر نظام إدارة قاعدة البيانات‬
‫توقف العمليات‬

.Functions and Services of DBMS [1] Pages (48-51)


There are different functions and services that DBMS can provide.
‫ ]الصفحات‬1[ ‫( وظائف وخدمات نظم إدارة قواعد البيانات‬48-51)
‫هناك وظائف وخدمات مختلفة يمكن أن توفرها نظم إدارة قواعد البيانات‬

1. Data storage, retrieval, and update: A DBMS must furnish


(provide) users with the ability to store, retrieve, and update data
in the database. The DBMS should hide the internal physical
implementation details (such as file organization and storage
structures) from the user.
2. ‫يجب أن يوفر نظام إدارة قاعدة البيانات‬: ‫تخزين البيانات واسترجاعها وتحديثها‬
‫(يزود )المستخدمين القدرة على تخزين البيانات واسترجاعها وتحديثها في قاعدة البيانات‬.
‫يجب أن تخفي قواعد إدارة قواعد البيانات تفاصيل التنفيذ الفعلي الداخلية (مثل هياكل‬
‫تنظيم الملفات والتخزين )عن المستخدم‬.

2. A User-Accessing Catalog: A DBMS must furnish a catalog in which


descriptions of data items are stored and which is accessible to users. A
system catalog, or data dictionary, is a repository of information
describing the data in the database: it is, the 'data about the data' or
metadata.

• ‫يجب أن يوفر نظام إدارة قواعد البيانات كتالو ًجا يتم فيه‬: ‫كتالوج الوصول إلى المستخدم‬
‫ أو‬، ‫كتالوج النظام‬. ‫تخزين أوصاف عناصر البيانات والتي يمكن للمستخدمين الوصول إليها‬
‫ هو مستودع للمعلومات التي تصف البيانات الموجودة في قاعدة البيانات‬، ‫قاموس البيانات‬:
‫"وهي "البيانات حول البيانات‬
.; ‫أو البيانات األولية‬

Typically, the system catalog stores:


Names, types, and sizes of data items;
Names of relationships;
Integrity constraints on the data;
Names of authorized users who have access to the data;
‫‪The data items that each user can access and the types of access‬‬
‫;‪allowed; for example, insert, update, delete, or read access‬‬
‫عادةً ما يقوم كتالوج النظام بتخزين‪:‬‬
‫أسماء وأنواع وأحجام عناصر البيانات ؛‬
‫أسماء العالقات ؛‬
‫قيود النزاهة على البيانات ؛‬
‫أسماء المستخدمين المصرح لهم الذين لديهم حق الوصول إلى البيانات ؛‬
‫عناصر البيانات التي يمكن لكل مستخدم الوصول إليها وأنواع الوصول المسموح؛ على سبيل‬
‫المثال ‪ ،‬قم بإدخال أو تحديث أو حذف أو الوصول للقراءة ؛‬

‫‪3. Transaction Support: A DBMS must furnish a mechanism which will‬‬


‫‪ensure either that all the updates corresponding to a given transaction‬‬
‫‪are made or that none of them is made. (See the example [1] on page‬‬
‫‪27, “Delete a member of a‬‬
‫دعم المعامالت‪ :‬يجب أن يقدم نظام إدارة قواعد البيانات آلية تضمن إما إجراء جميع التحديثات‬
‫المقابلة لمعاملة معينة أو عدم إجراء أي منها‪( .‬انظر المثال [‪ ]1‬في الصفحة ‪، 27‬حذف عضو‬
‫في استاف‪.‬‬

‫‪4. Concurrency Control Services: A DBMS must furnish a mechanism to‬‬


‫‪ensure that the database is updated correctly when multiple users are‬‬
‫‪updating the Database concurrently.‬‬
‫‪ .4‬خدمات التحكم في التزامن ‪ :‬يجب أن يوفر نظام إدارة قواعد البيانات آلية لضمان تحديث‬
‫قاعدة البيانات بشكل صحيح عندما يقوم عدة مستخدمين بتحديث قاعدة البيانات بشكل متزامن‪.‬‬

‫‪5. Recovery Services: A DBMS must furnish a mechanism for recovering‬‬


‫‪the Database in the event that the database is damaged in any way. If‬‬
‫‪the transaction fails then the database has to be returned to a‬‬
‫‪consistent state. This may be a result of a system crash, media failure,‬‬
‫‪or a hardware or software error causing the DBMS to stop.‬‬
‫‪ .5‬خدمات االسترداد ‪ :‬يجب أن يقدم نظام إدارة قواعد البيانات آلية الستعادة قاعدة البيانات في‬
‫حالة تلف قاعدة البيانات بأي طريقة‪ .‬في حالة فشل المعاملة ‪ ،‬يجب إعادة قاعدة البيانات إلى‬
‫حالة متسقة‪ .‬قد يكون هذا نتيجة لتعطل النظام أو فشل الوسائط أو خطأ في الجهاز أو البرنامج‬
‫‪DBMS.‬مما تسبب في توقف‬

‫‪6. Authorization Services: A DBMS must furnish a mechanism to ensure‬‬


‫‪that Only authorized users can access the database.‬‬
‫‪ .6‬خدمات التخويل ‪ :‬يجب أن يقدم نظام إدارة قواعد البيانات آلية لضمان أن المستخدمين‬
‫المصرح لهم فقط يمكنهم الوصول إلى قاعدة البيانات‪.‬‬

‫)‪Components of DBMS [1] Pages (53-55‬‬


‫‪It is not possible to generalize the component structure of a DBMS as it‬‬
‫‪varies Greatly from system to system. DBMS is partitioned into several‬‬
‫‪software components (or modules), each of Which is assigned a specific‬‬
‫‪operation. The major software components in a DBMS environment are‬‬
‫‪depicted in the Following figure.‬‬
‫مكونات نظام إدارة قواعد البيانات [‪ ]1‬الصفحات (‪)53-55‬‬
‫ال يمكن تعميم بنية مكون نظام إدارة قواعد البيانات ألنه يختلف إلى حد كبير من نظام إلى‬
‫آخر‪ .‬ينقسم نظام إدارة قواعد البيانات إلى العديد من مكونات البرامج (أو الوحدات) ‪ ،‬حيث يتم‬
‫تعيين كل عملية تشغيل محددة‪ .‬يوضح الشكل التالي مكونات البرنامج الرئيسية في بيئة نظام‬
‫إدارة قاعدة البيانات‪.‬‬
Query processor: This is a major DBMS component that transforms
queries into a Series of low-level instructions directed to the database
manager.

‫ هذا هو مكون نظام ادارة قاعدة البيانات الرئيسي الذي يحول طلبات‬: ‫تسائل المعالج‬/‫استعالم‬
.‫البحث إلى سلسلة من التعليمات ذات المستوى المنخفض الموجود إلى مدير قاعدة البيانات‬

Database manager (DM): The DM interfaces with user-submitted


application Programs and queries. The DM accepts queries and
examines the external (view Level) and conceptual schemas (logical
level) to determine what conceptual records are required to satisfy the
request. The DM then places a call to the file manager to perform the
request.

‫ تتفاعل قاعدة البيانات مع برامج التطبيقات المقدمة من قبل المستخدم‬: ‫مدير قاعدة البيانات‬
‫ تقبل قاعدة البيانات االستعالمات وتفحص المخططات الخارجية (مستوى‬.‫واالست عالمات‬
.‫العرض) والمفاهيمية (المستوى المنطقي) لتحديد السجالت المفاهيمية المطلوبة لتلبية الطلب‬
.‫يقوم مدير البلدية ثم بإجراء مكالمة إلى مدير الملفات لتنفيذ الطلب‬

File manager: The file manager manipulates the underlying storage files
and manages the allocation of storage space on disk. It passes the
requests on to the appropriate access methods, which either read data
from or write data into the system buffer (or cache).

‫ مدير الملفات يلتف ملفات التخزين األساسية ويدير تخصيص مساحة التخزين‬: ‫مدير الملفات‬
‫ إما قراءة البيانات من كتابة أو‬،‫ فإنه يمر الطلبات إلى طرق الوصول المناسبة‬.‫على القرص‬
.)‫إرسال البيانات إلى المخزن المؤقت النظام (أو ذاكرة التخزين المؤقت‬
DML preprocessor: This module converts DML statements embedded
in an Application program into standard function calls in the host
language. The DML Preprocessor must interact with the query
processor to generate the appropriate Code.
‫ المعالج‬DML: )‫تقوم هذه الوحدة بتحويل عبارات(دي ام ل‬
‫ يجب أن‬.‫المضمنة في برنامج التطبيق إلى استدعاءات الوظائف القياسية باللغة المضيفة‬
.‫(يتفاعل مع معالج مع معالج االستعالم إلنشاء المناسب للكود‬DML)

DDL compiler: The DDL compiler converts DDL statements into a set of
tables Containing metadata. These tables are then stored in the system
catalog.
‫برنامج التحويل البرمجي لـ‬DDL
DDl: ‫يقوم برنامج التحويل البرمجي لـ‬
DDL ‫بتحويل عبارات‬
‫ ثم يتم تخزين هذه الجداول في‬.‫إلى مجموعة من الجداول التي تحتوي على بيانات التعريف‬
.‫كتالوج النظام‬

Catalog manager: The catalog manager manages access to and


maintains the System catalog. The system catalog is accessed by most
DBMS components.
‫ يتم‬.‫ يقوم مدير الكتالوج بإدارة الوصول إلى كتالوج النظام والحفاظ عليه‬: ‫مدير الكتالوج‬
‫الوصول إلى كتالوج النظام بواسطة معظم مكونات‬DBMS.
The major software components (as shown in the Figure above) for the
database
Manager are as follows:
‫مكونات البرنامج الرئيسية (كما هو موضح في الشكل أعاله )لقاعدة البيانات‬
‫المدير كالتالي‬:
Authorization control: This module checks that the user has the
necessary Authorization to carry out the required operation.
‫ تتحقق هذه الوحدة من أن المستخدم لديه ما يلزم‬:‫التحكم في التخويل‬
‫إذن لتنفيذ العملية المطلوبة‬.
Command processor: Once the system has checked that the user has
authority to Carry out the operation, control is passed to the command
processor.
‫بمجرد أن يتحقق النظام من أن المستخدم لديه سلطة‬: ‫معالج األوامر‬
‫ يتم تمرير التحكم إلى معالج األوامر‬، ‫تنفيذ العملية‬.
Integrity checker: For an operation that changes the database, the
integrity Checker checks that the requested operation satisfies all
necessary integrity Constraints (such as key constraints).
‫ والتكامل‬، ‫لعملية تغيير قاعدة البيانات‬: ‫مدقق النزاهة‬
‫يتحقق المدقق من أن العملية المطلوبة تلبي جميع النزاهة الالزمة‬
)‫القيود (مثل القيود الرئيسية‬.

Query optimizer: This module determines an optimal strategy for the


query execution.
‫تحدد هذه الوحدة النمطية استراتيجية مثالية لالستعالم‬: ‫حسن االستعالم‬
ِّ ‫ُم‬
‫إعدام‬
Transaction manager: This module performs the required processing of
Operations it receives from transactions.
‫ تقوم هذه الوحدة بالمعالجة المطلوبة لـ‬:‫مدير المعامالت‬
.‫العمليات التي يتلقاها من المعامالت‬

Scheduler: This module is responsible for ensuring that concurrent


operations on the database proceed without conflicting with one
another. It controls the relative Order in which transaction operations
are executed.
‫ هذه الوحدة هي المسؤولة عن ضمان أن عمليات متزامنة على قاعدة البيانات‬:‫جدولة‬
‫ وهو يسيطر على النظام النسبي الذي يتم فيه تنفيذ‬.‫تضيء دون التضارح مع بعضها البعض‬
.‫عمليات المعامالت‬
Recovery manager: This module ensures that the database remains in a
consistent State in the presence of failures. It is responsible for
transaction commit and abort
‫ تضمن هذه الوحدة أن تبقى قاعدة البيانات متناسقة‬: ‫مدير االسترداد‬
)‫ وهي مسؤولة عن ارتكاب المعامالت وااللغاء (ايقاف‬.‫الدولة في وجود الفشل‬
Buffer manager: This module is responsible for the transfer of data
between main Memory and secondary storage, such as disk and tape.
The recovery manager and the buffer manager are sometimes referred
to collectively as the data manager. The buffer manager is sometimes
known as the cache manager.
‫ هذه الوحدة هي المسؤولة عن نقل البيانات بين الرئيسي‬: ‫مدير المخزن المؤقت‬
‫ مدير االنتعاش و‬.‫ مثل القرص والشريط‬، ‫الذاكرة والتخزين الثانوي‬
.‫تتم اإلشارة إلى إدارة المخزن المؤقت أحيانًا بشكل جماعي باسم مدير البيانات‬
‫يُعرف مدير المخزن المؤقت أحيانًا باسم مدير التخزين المؤقت‪.‬‬

‫‪The End -_-‬‬


‫️©_ ️🅱_‪By:- The‬‬

You might also like