بسم الله الرحمن الرحيم.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

Chapter 2 Database System Concepts and Architecture
1 Pertemuan 02 Database environment Matakuliah: >/ > Tahun: > Versi: >
Database Systems Chapter 2
Chapter 2 Database Environment.
1 Chapter 2 Database System Concepts and Architecture.
Chapter 2 Database Environment Pearson Education © 2014.
1 Chapter 2 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data u User’s view immune to changes.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Lecture Two Database Environment Based on Chapter Two of this book:
Database System Concepts and Architecture Dr. Ali Obaidi.
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 2: Database System Concepts and Architecture - Outline Data Models and Their.
Faculty of Information Science and Technology Mahanakorn University of Technology Topic 2 Database System Concepts and Architecture.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
2. Database System Concepts and Architecture
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 2 Database System Concepts and Architecture.
8/31/2012ISC329 Isabelle Bichindaritz1 Database Environment.
1Mr.Mohammed Abu Roqyah. Database System Concepts and Architecture 2Mr.Mohammed Abu Roqyah.
Database Environment Session 2 Course Name: Database System Year : 2013.
Database System Concepts and Architecture
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
DBMS_Week 3-4 DBMS. Three-Schema Architecture – Internal schema (one view) describes physical storage structures access paths, indexes used Typically.
DataBase System Concepts and Architecture
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Chapter 2 Database Environment.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
1 Chapter 2 Database Environment Pearson Education © 2009.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
1 Database Design Chapter-2- Database System Concepts and Architecture Reference: Prof. Mona Mursi Lecture notes.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Database Systems 主講人 : 陳建源 日期 :99/9/14 研究室 : 法 Chapter 2 Database System Concepts and Architecture.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Copyright © 2011 Ramez Elmasri and Shamkant Navathe Chapter 2 Database System Concepts and Architecture.
College of Arts & Science Computer Science Department
Chapter (2) Database Systems Concepts and Architecture Objectives
Databases (CS507) CHAPTER 2.
Databases and DBMSs Todd S. Bacastow January 2005.
國立臺北科技大學 課程:資料庫系統 Chapter 2 Database Environment.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Chapter 2: Database System Concepts and Architecture - Outline
Chapter (2) Database Systems Concepts and Architecture Objectives
Chapter 2 Database Environment.
Chapter 2 Database System Concepts and Architecture
Database System Concepts and Architecture
Database System Concepts and Architecture
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
11/9/2018.
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2: Database System Concepts and Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data Base System Lecture : Database Environment
بسم الله الرحمن الرحيم Lecture( 4)
Data, Databases, and DBMSs
Database Environment Transparencies
12/8/2018.
هيكلة نظم إدارة قواعد البيانات (DBMS Architecture)
Database Systems Instructor Name: Lecture-3.
Chapter 2 Database Environment Pearson Education © 2014.
Database System Concepts and Architecture
5/8/2019.
5/8/2019.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Database System Concepts and Architecture
Presentation transcript:

بسم الله الرحمن الرحيم

Lecture(4) Chapter(2) : Database system concepts and architecture.

تمتازنظم قواعد البيانات (DB approach) بالآتي :- معمارية نظم إدارة قواعد البيانات واستقلالية البيانات DBMS Architecture And data Independence تمتازنظم قواعد البيانات (DB approach) بالآتي :- الفصل بين البرامج التطبيقية والبيانات. Insulation of programs and data (Program – data independence) السماح بتعريف عدد من المرئيات للمجموعات المختلفة للمستخدمين. Support of multiple user views. استخدام الكاتلوج لتخزين وصف قاعدة البيانات use of catalog to store DB Schema.

ANSI : American National Standards Institute تعرف بــ(Three schema architecture ) أو (ANSI / SPARC architecture) ANSI : American National Standards Institute SPARC : Standards planning and requirement Committee

Three schema architecture تتكون هذه المعمارية من ثلاثة مســتويات وذلك لفصل البرامج التطبيقية عن قاعــدة البيانـات (Physical DB). في هذه المعمارية تعرف خارطة (أو عدة خارطات ) لكل مستوي (انظر الشكل أدناه):- Defines DBMS schemas at three levels:

The three-schema architecture

User's view of the Database Cont. External level : User's view of the Database هذا الجزء يوصف الجزء من قاعدة البيانات المناسب لكل مستخدم (end user) ويحتوي علي عدد من المرئيات المختلفة ويخفي بقية قاعدة البيانات عنهم. لهذا المستوي عدد من الخارطات الخارجية ( (External Schemas بعدد المرئيات للمستخدمين. يستخدم لإنشاء هذه الخرط أي Implementation Data Model أو High Level Data Model. المرئيات في هذا المستوي قد تحتوي علي نفس البيانات ولكن معروضة بطرق مختلفة علي حسب حوجة المستخدم والتي تختلف من مستخدم لآخر. وقد تحتوي مرئيات المستخدمين علي بيانات محسوبة (derived) من بيانات داخل قاعدة في البيانات

Conceptual Level :- Community view of the database في هذا المستوي توصف بنية كل قاعدة البيانات لكل البيانات للمستخدمين. ولهذا المستوي خارطة واحدة تعرف بـ Conceptual Schema) ) ولانشاء هذه الخرطة يستخدم أي High Level data Model أو (Implementation data model ). تخفي الخارطة في هذا المستوي كل تفاصيل كيفية تخزين البيانات (details of physical data storage) . وإنما تهتم بتحديد البيانات التي يجب تخزينها في قاعدة البيانات ( تحديد الـ Schema Constructs ) وتحديد أنواع البيانات (data types ) لـ (data items ) والعلاقات بين البيانات والقيود علي البيانات وكل ما يتعلق بسرية وتكاملية البيانات والuser operations .

Internal Level :- The physical representation of the database on the computer تعرف الخارطة في هذا المستوى وتسمي بـ (Internal Schema ) وتوصف فيها كيفية تخزين قاعدة البيانات وكيفية الوصول لها (Physical Storage Structure of DB ) . وتستخدم لإنشاء هذه الخارطة (Physical data Model ) وكمثال للمعلومات التي توصف في هذه الخارطة كيفية تخزين قاعدة البيانات كملف والفهارس المبنية لهذا الملف وتحدد ممرات الوصول لاسترجاع البيانات (Access path ) وتحديد تجمعات القرص لتخزين ملف قاعدة البيانات ، وكذلك تحديد نسق السجلات .

نلاحظ أن الخرط في المستويات الثلاثة تمثل فقط وصف للبيانات والبيانات موجودة حقيقة في المستوي الفيزيائي (physical level ) تحت الـ (internal level ) ،الشئ الذي يؤكد الفصل التام بين البرامج والبيانات. إدارة الـ (physical level ) هي مسئولية نظام التشغيل ونظام إدارة قواعد البيانات معاً (تختلف من نظام لآخر).

نجد أن الـ DBMS والتي تستخدم هذه المعمارية مسئوله عن عمليات تحويل الـ user request من خارطة إلى أخري (من مستوي لآخر)(Mapping between three types of schemas ) الطلب من الـ external Schema يحول الي طلب في ال conceptual Schema وتسمي هذه العملية بــ conceptual mapping / external ثم يحول هذا الطلب من الـ conceptual schema الي طلب في الـ internal schema ويعرف هذا التحويل بـ internal mapping / conceptual وتتعامل الـ internal schema مباشرة مع البيانات المخزنة لتنفيذ الـ request) ) وإذا كان الطلب هو عبارة عن عمليات استرجاع لبيانات ما فيتم استرجاعها عبر الـ schema external. كل المعلومات اللازمة لعمليات ال mapping موجودة في ال DBMS catalog.

عمليات تحويل الطلب من مستوي الي آخر تأخذ كثير من الزمن (time consuming) السبب الذي أدي الي أن معظم الـDBMS تدمج الـ schema external مع الـ conceptual schema او internal Schema مع الـ conceptual schema ونجد أيضا معظم الـ DBMS تستخدم نفس النموذج لوصف الـ conceptual والـ external Schemas .

Example

Data Independence Data independence can be defined as the capacity to change the schema at one level of DB system without having to change the schema at the next higher level. Two types of DI: Logical Data Independence. Physical Data Independence.

Data Independence (continued) Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their associated application programs. Conceptual schema changes (e.g. addition/removal of entities). Should not require changes to external schema or rewrites of application programs. Another def:- Refers to immunity of external schemas to changes in conceptual schema.

Data Independence (continued) Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema. For example, the internal schema may be changed when certain file structures are reorganized or new indexes are created to improve database performance Another defn: Refers to immunity of conceptual schema to changes in the internal schema.

Data Independence and the ANSI-SPARC Three-Level Architecture

Data Independence (continued) When a schema at a lower level is changed, only the mappings between this schema and higher-level schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas.

لغات نظم إدارة قواعد البيانات DBMS Languages DDL : Data Definition Language وهي تستخدم بواسطة الـ DBA والـ DB designers لتعريف الـ ( Conceptual وExternal Schemas). وذلك في حالة أن الـ DBMS لا تفصل بين الـ Conceptual و الـ External Level ) أي DBMS لها مترجم Compiler لترجمة أوامر ال DDL

SDL : Storage Definition Language وتستخدم هذه اللغة لتحديد الخارطة الداخلية (Internal Schema ) VDL :- View Definition Language وهي تستخدم لتحديد مرئيات المستخدمين ((External Schemas وذلك عندما تفصل الـ DBMS بين الـ Conceptual والـ External Level، أي تطبق ال Three Schema Architecture

DML : Data Manipulation Language وهي تستخدم بعد تحديد كل خارطات قاعدة البيانات وتحميلها بالبيانات وذلك لاسترجاع وتحديث البيانات ( حذف ، إضافة ، تعديل ) DML لها نوعان:- High – Level or non Procedural DML:- في هذا النوع إدخال الأوامر أما يكون مباشرة من الشاشة كأوامر SQL أو تكون الأوامر مضمنة في احدي لغات البرمجة ويتم استخلاص هذه الأوامر وتنفيذها بواسطة ال DBMS. Low-Level or Procedural DML أوامرها تكون مضمنة دائماً في احدي لغات البرمجة وذلك لان كل أمر فيها يسمح باسترجاع سجل واحد فقط ولذا تستخدم احدي لغات البرمجة للاستفادة من إمكانيات اللغة ( كاستخدام الحلقات التكرارية Loops مثلا لاسترجاع أكثر من سجل ). في معظم ال DBMS الحالية والتي تستخدم النموذج العلائقي كـ (Implementation Model ) نجد أن أوامر الـ DDL و VDL و DML كلها مضمنة في لغة واحدة شاملة وهي SQL وهي لغة النموذج العلا ئقي ، أما الـ SDL فتكون لغة منفصلة.

واجهات التطبيق في نظم إدارة قواعد البيانات DBMS Interfaces Menu based Interfaces:- أي واجهة تطبيق لها عدد من الخيارات (Options) تسمي بـ Menus ومن اشهر أنواعها الـ Pull down menus والتي تستخدم للتصفح (browsing) في قاعدة البيانات. Forms – based Interfaces:- لكل DBMS لغة معينة لتحديد الـ Forms وهي عادة ما تستخدم لحذف وتعديل البيانات وتستخدم بواسطة الـ ( Naive users ) .

Graphical User Interfaces:- وهي تستخدم لتوضيح خارطة قاعدة البيانات كـ ( diagram ) Interfaces for DBA:- وهي تستخدم بواسطة الـ DBA لإنجاز بعض المهام كمنح الصلاحيات للمستخدمين وCreate accounts و Changing accountsو Reorganizing the storage structures of DB. Interface for parametric users: تبرمج لهم احياناً بعض المفاتيح لانجاز مهامهم المتكررة بأقل عدد ممكن من ال (keystrokes).

Natural language interfaces: في هذه الواجهات يمكن للمستخدم ان وجه طلبه باستخدام لغة كاللغة الانجليزية مثلاً. 7.Speech input and output.

Typical DBMS Component Modules

Database System Utilities To perform certain functions such as: Loading data stored in files into a database. Includes data conversion tools. Backing up the database periodically on tape. Reorganizing database file structures. Report generation utilities. Performance monitoring utilities. Other functions, such as sorting, user monitoring, data compression, etc.

Read section (2.5)

Classification of DBMS نموذج البيانات (Data Model ) المستخدم في الـ DBMS (Main Criterion for Classification): كل الـ DBMS الحالية اما تستخدم الـ Relational Data Model أو Object Data Model . Examples:- Oracle, Access Relational DBMS IRIS, ORION Object DBMS Informix universal server: object-relational DBMS

الـDBMS أما عدد المستخدمين (Number of users supported by the system) Single user system (one user at the time using DB) أو Multiuser system (more than one user at a time concurrently) (Needs concurrency control)

عدد الـ sites التي يمكن توزيع قاعدة البيانات عليها Number of Sites over which the database is distributed من حيث عدد الـ Sitesهنالك عدة أنواع للـDBMS :- 1. Centralized DBMS (DB Stored at a single computer (site). Ex: - client – server module. DB Stored at the server 2. Distributed DBMS: DBMS Software and DB are distributed over many sites connected by computer network (homogeneous) 3. Federated DBMS (Multi database systems distributed across multiple sites , but each site user different DBMS (Heterogeneous DBMS)

Cost. Type of access path options for storing files. General purpose or specific purpose .

Good bye chapter TWO