1 / 83

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

بسم الله الرحمن الرحيم. Lecture (1). Welcome. Welcome to حسب304 An Introduction to databases. We hope you will enjoy it. Information about course. إسم المقرر : مبادئ قواعد البيانات An Introduction to databases رمز المقرر :حسب304. Database course - People.

brian
Télécharger la présentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Lecture (1)

  3. Welcome Welcome to حسب304 An Introduction to databases. We hope you will enjoy it.

  4. Information about course • إسم المقرر : مبادئ قواعد البيانات An Introduction to databases • رمز المقرر :حسب304

  5. Database course - People • المحاضر: أ.ايمان محمد الحسن. Office hours: sunday 10-2. Email :ekambal@uofk.edu. • مساعدى التدريس:

  6. Cont. • مدة الدراسة : • محاضرة واحدة أسبوعيا لمدة اربعة عشر أسبوعا ، مدة المحاضرة ساعتان . • تقييم المقرر: • 60% الامتحان النهائي • 15% الامتحان نصف الفصلي • 25% تمارين+مشروع

  7. متطلبات المقرر • الإلمام بإحدي لغات البرمجة وإحدي برامج إدارة نظم قواعد البيانات.

  8. أهداف المقرر • التعرف على قواعد البيانات ولماذا الاتجاه الي استخدام نظم قواعد البيانات بدلاً عن النظم التقليدية القديمة ثم كيفية تصميم قاعدة بيانات جديدة وبأسس علمية صحيحة و التعرف علي لغات برامج نظم قواعد البيانات.

  9. المراجع المستخدمة • المرجع الاساسي: Elmasri and Shamkant. "Fundamentals of Database Systems". 5th edition. • مرجع إضافي: Thomas M. Connolly &Carolyn E.Begg"DataBase Systems,A practical Approach To Design ,Implementation ,And Management . Second Edition. • Two references are published by Addison Wesley .

  10. Database Systems in two words • This course is an introduction to database systems • Considers questions how to design, implement and use data intensive computer applications. • Majority of the practical tasks in industry require applying relatively not complex algorithms to huge amounts of well structured data.Accordingly, efficiency of an application depends on the quality of (logical and physical) data organization.

  11. Why Learn Database Systems • Wherever you go, there are databases: • Student records • Airlines and hotels reservations, • Bank accounts • One of the first things people will ask you in an job interview is: “What do you know about databases?” • Databases are a matured area with a sound theoretical foundation and great practical knowledge.

  12. محتويات المقرر 1. المفاهيم العامة لقواعد البيانات ومستخدمي قواعد البيانات Chapter (1):Databases and Database Users 1.1Introduction. 1.2 An example. 1.3 Characteristics of Database Approach. 1.4 Actors on the Scene. 1.5 Workers behind the Scene 1.6 Advantages of using a DBMS 1.7 A Brief History of DB Application 1.8 When Not to Use a DBMS

  13. Cont. 2.مفاهيم نظم قواعد البيانات ومعماريتها Chapter(2) : Database Systems Concepts and Architecture 2.1Data Models, Schemas, and Instances. 2.2Three-schema Architecture and Data Independence. 2.3 Database Languages and Interfaces. 2.4 The Database system environment 2.5 Centralized and Client /Server Architecture for DBMSs. 2.6 Classification of Database Management Systems

  14. Cont. 3. نموذج الكائنات المرتبطة Chapter(3): Data Modeling Using The Entity Relationship (ER) Model. 3.1 Using High-Level Conceptual Data Models for Database Design. 3.2 An Example Database Application 3.3 Entity Types, Entity Sets, Attributes, and Keys. 3.4 Relationships, Relationship Types, Roles, and Structural Constraints. 3.5 Weak Entity Types. 3.6 Refining the ER Design for the COMPANY Database. 3.7 ER Diagrams, Naming Conventions, and Design Issues. 3.9 Relationship Types of degree higher than two.

  15. Cont. 4 نموذج الكائنات المرتبطة المحسن. Chapter(4): Enhanced Entity Relationship(EER) Model.

  16. Cont. 5.النموذج العلائقي Chapter(5): Relational data Model and Relational Constraints. .5.1 Relational Data Model Concepts 5.2 Relational Constraints and Relational Database .Schemas 5.3 Update Operations ,transaction ,and Dealing with Constraints Violations

  17. 6 الجبر العلائقي Chapter(6) the Relational Algebra AND relational calculus 6.1Unary Relational Operations. 6.2 Relational Algebra Operations from set theory. 6.3 binary Relational Operations . 6.6 The Tuple Relational calculus. 6.7 the Domain Relational Calculus.

  18. cont. 7. تحويل نموذج الكائنات الي النموذج العلائقي Chapter (7): ER to Relational Mapping. 7.1 Relational DB Design Using ER –to- Relational Mapping. 7.2 Mapping EER Model Constructs to Relation.

  19. cont. 8. لغة الاستفسارات الهيكلية Chapter (8) :Structured Query Language SQL-99:schema Definition, constraints , queries, and views. 8.1 SQL Data Definitions , Constraints and data types 8.2 Specifying Constraints In SQL. 8.3 schema change statements in SQL. 8.4 Basic Queries in SQL. 8.5 More Complex SQL Queries. 8.6 Insert . Delete , And Update Statements In SQL. 8.8 Views (Virtual Table) In SQL.

  20. Cont. 9. الاعتماد الدالي والتبسيط Chapter(10):Functional Dependencies and Normalization for relational Databases. 10.1 Informal Design Guidelines for Relation Schemas. 10.2 Functional Dependencies. .10.3 Normal forms Based on Primary Keys 10.4 General Definitions of Second and Third Normal Forms.

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

  22. Lecture(2) Chapter 1 Introduction: Databases and Database Users

  23. Introduction • تستخدم نظم قواعد البيانات في معظم الموؤسسات المختلفة كالبنوك , الموؤسسات التعليمية,مكاتب الحجز الجوي,المصانع..........الخ (databases plays a critical rule in almost all areas where computers are used ,including business ,ecommerce, engineering, medicine,…etc) • التطبيقات التقليدية لنظم قواعد البيانات: البيانات إما نصوص text)) اوارقام numbers)). • امثلة للتطبيقات الحديثة لنظم قواعد البيانات: • Multimedia DB systems • Geographical information system (GIS) • Data Warehousing And Data Mining • Interaction Between DB And WWW • Real time and Active DBs • Temporal DBs • First part of book focuses on traditional applications. • A number of recent applications are described later in the book (for example, Chapters 24,26,28,29,30)

  24. General concepts • Definition of DB : collection of related data. )قاعدة البياتات هي عبارة عن مجموعة من البيانات ذات العلاقة ببعضها البعض(. • this defn is more general. Essential database characteristics are: • Represents an aspect of the real world (miniworld, UoD), • Well structured (even has a strict regular structure), • Reflects (or should reflect) current state of the UoD, • Has users and applications, • Stored in a permanent (persistent) computer memory, and • Accessed and manipulated using a DBMS • All these characteristics have to be met • UOD :universe of discourse • Mini-world: • Some part of the real world about which data is stored in a database.

  25. What Is a Database? Real World Facts about world and behaviour of world represented in contents and operations of a database Users Database

  26. Another definition:A DB is a shared collection of logically related data (and description of this data ),designed to meet the information needs of an organization.

  27. Definition of Data (Datum) • Data is a value of a property of an individual UoD object or a relationship (between two UoD objects) at a particular period of time. • Example

  28. Another def of data: • Data: • Known facts that can be recorded and have an implicit meaning • A database can be of any size and complexity, and it may be generated manually or computerized.

  29. Database Management System (DBMS)نظم ادارة قواعد البيانات • A collection of programs that enable: • Defining (describing the structure), • Constructing (populating by data), • Manipulating (querying, updating), • Preserving consistency, • Protecting from misuse, • Recovering from failure, and • Concurrent using of a database.

  30. Another definition • DBMS: A software system that enables users to define ,create, maintain the database and provides controlled access to this database. • DBMS either general purpose or specific purpose software.

  31. Database systemsنظم قواعد البيانات • DB+DBMS DB system • Database System: • The DBMS software together with the data itself. Sometimes, the applications are also included.

  32. Example of DB

  33. Example of DB • Mini-world for the example: • Part of a UNIVERSITY environment. • Some mini-world entities: • STUDENTs • COURSEs • SECTIONs (of COURSEs) • (academic) DEPARTMENTs • INSTRUCTORs

  34. Example of DB • Some mini-world relationships: • SECTIONs are of specific COURSEs • STUDENTs take SECTIONs • COURSEs have prerequisite COURSEs • INSTRUCTORs teach SECTIONs • COURSEs are offered by DEPARTMENTs • STUDENTs major in DEPARTMENTs

  35. Characteristics of the DB approach • Difference between DB systems(DB approach) and file-based systems (traditional file processing). • Definition of file-based system: A collection of application programs that perform services for the end-users such as production of reports. Each program defines and manages its own data.

  36. File handling routines Data entry and reports Academic office File definition Academic office files File handling routines Account office Data entry and reports File definition Account office files An example of file based system File definition

  37. ماهي عيوب نظم الملفات التقليدية؟ • Separation and isolation of data. • Duplication of data. • Data dependence. • Incompatibility of files. • Fixed queries.

  38. DB Approach • Arose because: • Definition of data was embedded in application programs, rather than being stored separately and independently. • No control over access and manipulation of data beyond that imposed by application programs. • Result: • the database and Database Management System (DBMS).

  39. DB Approach DB SYSTEM Data entry and reports Academic office DB Academic application programs Academic office files and account office files and files defn DBMAS Data entry and reports Account office Account application programs

  40. Comparison between DB approach and TFP approach • The main characteristics of DB approach versus TFP approach are: • Self-Describing Nature of a Database System – In addition to DB ,DB system has a complete definition or description of the database structure and constraints. • DB definition is stored in the system catalog, which contains information such as the structure of each file, the type and storage format of each data item, and various constraints on the data. • This allows the DBMS software to work with different database applications. • (Fig 1.1). • In TFP .data defn is a part of application program , ie these programs are constrained to work with only on DB.

  41. An example of a database catalog

  42. Cont. • Insulation between Programs and Data • Called program-data independence. • Allows changing data structures and storage organization without having to change the DBMS access programs. • The structure of data files is stored in the DBMS catalog separately from the access programs. • In TFP changes the structure of file may require changing all access programs.

  43. Cont. • Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database. • Support of Multiple Views of the Data - Each users may see a different view of the database, which describes only the data of interest to that user. (fig 1.5)

  44. Cont. • Sharing of data and multi-user transaction processing: • Allowing a set of concurrent users to retrieve from and to update the database. • Concurrency control within the DBMS guarantees that each transaction is correctly executed or aborted. • Recovery subsystem ensures each completed transaction has its effect permanently recorded in the database. • OLTP (Online Transaction Processing) is a major part of database applications. This allows hundreds of concurrent transactions to execute per second.

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

  46. Lecture(3) Chapter 1 Introduction: Databases and Database Users

  47. Database Users • Users may be divided into • Those who actually use and control the database content, and those who design, develop and maintain database applications (called “Actors on the Scene”), and • Those who design and develop the DBMS software and related tools, and the computer systems operators (called “Workers Behind the Scene”).

  48. Actors on the Scene • Database administrator (DBA): 1-Administering the primary resource of DBsystem (DB itself) and DBMS (secondary resource). 2- responsible for authorizing access to the db, for coordinating and monitoring its use. 3- responsible for acquiring software and hardware when needed. 4-Solving the problems of the system such as security or poor system response time.

  49. Cont. • DB designers: Responsible to define the content, the structure, the constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs. .

More Related