Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 An Overview of Database Management. 1-2 Topics in this Chapter What is a Database System? What is a Database? Why Database? Data Independence.

Similar presentations


Presentation on theme: "Chapter 1 An Overview of Database Management. 1-2 Topics in this Chapter What is a Database System? What is a Database? Why Database? Data Independence."— Presentation transcript:

1 Chapter 1 An Overview of Database Management

2 1-2 Topics in this Chapter What is a Database System? What is a Database? Why Database? Data Independence Relational Systems, and Others

3 1-3 Database System Computerized record-keeping system Supports operations –Add or delete files to the database –Insert, retrieve, remove, or change data in database Components –Data, hardware, software, users

4 1-4

5 1-5 Database System - Data May support single or many users Many users in organizations –Data is integrated –Data is shared Different users will require different views

6 1-6 Database System - Hardware Data is stored on Disk Direct access to subset portions Rapid I/O Data operated on in main memory

7 1-7 Database System - Software Database manager Database server Database management system (DBMS) DBMS provided by specific vendor

8 1-8 Database System - Software DBMS is not ( but may come with) –Application Development Tools –Application Software –TP Monitor –Report Writer –System utilities

9 1-9 Database System - Users Application programmers End users Database Administrators

10 1-10 What is a Database? Collection of persistent data Collection of true propositions Made up of entities, relationships, properties Implements a data model

11 1-11 What is a Database? - Persistence Stores enterprise information over time Outlasts the running of a computer program Updated and retrieved in OLTP operational/production system Offers decision support via data warehouse

12 Routine : highly repetitive application Online Transaction Processing (OLTP) Decision support system. Enterprises supports two kinds of Data : Operational data and Data Warehouse. 1-12

13 1-13 What is a Database? – Entities and Relationships Entity is a person, place, event or thing, about which we wish to store information Relationship is a connection between entities, about which we wish to store information A relationship can be considered a special case of entity E/R diagram: It constitutes a technique for representing the logical structure of a database in a pictorial manner.

14 1-14

15 1-15 What is a Database? - Properties Entities have properties Properties are the characteristics of an entity Properties can be simple or complex

16 1-16 Data and Data Models Database is a collection of true propositions Data model is an abstract, self-contained, logical representation Implementation of the data model on a specific platform Data model as template vs. instantiation for a specific enterprise The Model is what users should know about (in opposite to the implementation

17 The Advantages of DataBase over Tradition paper-based methods. Compactness speed Less drudger Currency Protection 1-17

18 DA and DBA DA: a person understands what is the data and the needs of the enterprise with respect to that data. To decide what data should be stored To establish policies for maintaining and dealing with that data. (who can perform what operations on what data in what circumstances, e.g., the data security policy). Manager not technician. 1-18

19 DBA The technical person responsible for implementing the DA’s decisions. IT professional. To create the actual database To put in place the technical control needed to enforce the policy decisions made by DA. DBA has a stuff of system programmers. 1-19

20 1-20 Why Database? Shared data Reduced redundancy Reduced inconsistent data Transaction support Support for data integrity Security enforcement Support for standards Conflicting requirements can be met

21 1-21

22 1-22 Data Independence Immunity of applications to change in physical representation and access technique (the applications don’t depend on any particular physical representation or access techniques Database separates logical and physical representation of data Allows changes to application programs without changing the structure of the underlying data And vice versa It’s a good thing Different applications may require different views DBA &DBMS must have freedom to change the physical representation

23 1-23

24 1-24 Materialized Data Stored fields, collected as… Stored records, collected as… Stored files Old systems, e.g., COBOL applications, directly connect to data formats Newer database systems offer greater data independence, but could do better

25 Stored field is the smallest unit of stored data. The Database contains many occurrences (instances) of each several types. The Stored record is a collection of related stored fields. The Stored file is the collection of all currently existing occurrences of one type of stored record. 1-25

26 1-26

27 1-27 Relational Systems Most important innovation in database history Based on logic and mathematics Data is perceived as tables, only Operators derive new tables from existing A table is a “relation,” mathematically Not pointer based (to the user)

28 1-28 Not Relational Systems Hierarchic Network Inverted List Object Object/Relational Multi-dimensional

29 1-29

30 Chapter 2 Data Base System Architecture 1-30

31 The Aim of The Architecture is to provide a framework for describing general database concepts and for explaining the structure of specific database systems. 1-31

32 1-32

33 1-33

34 1-34

35 1-35

36 The Three Levels Of The Architecture The Internal Level or Storage Level. Closest to the physical storage The External Level or User Logical Level. Closest to the users. The Conceptual Level or the community logical level. 1-36

37 Fig 2.2 1-37

38 In Relational Model The Conceptual and External Levels are relational The internal Level is not relational. (pointers, hashes, indexes, etc.) 1-38

39 Slide 1- 39 Database Schema, Instance and State Database Schema: –Includes descriptions of the database structure, data types, and the constraints on the database. Schema Diagram: –An illustrative display of (most aspects of) a database schema. Schema Construct: –A component of the schema or an object within the schema, e.g., STUDENT, COURSE. Database State: Distinction –The database schema changes very infrequently. –The database state changes every time the database is updated. Schema is also called intension. State is also called extension.

40 Slide 1- 40 Example of a Database Schema

41 Slide 1- 41 Example of a database state NameStudent_numberClassMajor Smith171CS Brown82CS STUDENT

42 Fig 2.3. 1-42

43 The External Level DSL : Data sublanguage it is embedded in within the host language. Host Language: is responsible for providing various non-database facilities. SQL is either interactively as stand-alone query language or embedded in other languages. DDL and DML 1-43

44 DDL :Data Definition Language Supports the definition or declaration of database objects.(For writing the Schema) DML : Data Manipulation Language Supports the processing or manipulation of such objects. DML will retrieve external record occurrences. External View : The content of the database as seen by some particular user. External record is the logical record. External view is the database. Each External view is defined by External Schema 1-44

45 Conceptual Level: It is the view of the data as it really is rather than as users are forced to see it by the limitation of the particular language or hardware they might be using. Conceptual view consists of multiple occurrences of many types of conceptual record. The conceptual Schema is written using Conceptual DDL. The Conceptual view is the view of the total database content. The conceptual Schema includes also the security and integrity constraints. It describes the complete enterprise, how the data is used, how it flows, the controls to be applied. In most existing systems, the conceptual schema is a little more than a simple union of all individuals of external schemas. 1-45

46 Internal Level: It is the low level representation of the entire database. The internal record is called the stored record. The internal schema defines the various stored record types and specifies what indexes exist, how stored fields are represented what physical sequences the stored records are in. The internal view and internal schema are called stored database and stored database definition. 1-46

47 Mappings There are two types : The conceptual/internal and the external/conceptual mappings. The conceptual/internal mappings defines the correspondence between the conceptual view and the stored database. If the structure of the stored database is changed then the conceptual/internal mapping must be changed so the conceptual schema remains invariant. The effects of such changes must be isolated below the conceptual level in order to preserve the physical data independence (The capacity to change the internal schema without having to change the conceptual schema) 1-47

48 The external/conceptual mappings defines the correspondence between a particular external view and the conceptual view. It is the key to providing the logical data independence. The logical data independence is the capacity to change the conceptual schema without having to change the external schema. 1-48

49 The Database Administrator DA: makes strategic and policy decisions, identify the entities of interest to the enterprise (Logical database design). Define the damage control schema. DBA is responsible for : –Defining the conceptual schema (using concept. DDL) –Defining the internal schema (physical database design) –Liaising with users (to write the external schema) –Defining Security and integrity constraints (Conceptual level) –Defining dump/restore schemas (in the event of damage). Spreading the data collection across several databases. –Monitoring performance and responding to changing requirements. 1-49

50 The Database Management System DBMS. Software that handles all access to the database. The cycle is : 1- A user access request (SQL) 2-DBMS accepts the request and analyze it. 3-DBMS inspects the external schema for that user, the corresponding ext./concept. Mapping, the conceptual schema, the concept./internal mapping and the stored database definition. 4-The DBMS executes the necessary operations. 1-50

51 DBMS functions: Data definition (accept 3 levels and corresponding mappings in source form and convert them to appropriate object form through DDL compiler) Data Manipulation (handles requests through DML compiler). Planned and unplanned requests. Optimization and execution. Efficient way of implementing the request. (run-time manager) Data Security and integrity. Monitoring and reject any attempt to violate security or integrity constraints. Data recovery and concurrency. (Transaction manager) 1-51

52 Data Dictionary - Metadata The dictionary or catalog stores information about the database itself This is data about data or ‘metadata’ Almost every aspect of the DBMS uses the dictionary The dictionary holds –Descriptions of database objects (tables, users, rules, views, indexes,…) –Information about who is using which data (locks) –Schemas and mappings

53 Performance. DBMS provide the user interface to the database system File manager: –component of the operating system that manages the stored files, it is closer to the disk than the DBMS. –cannot handle requests because they are not aware of the internal structure –Provide little or no support for security and integrity constraints. –Provide little or no support for recovery and concurrency controls. –No genuine data dictionary –Much less data indepence. –Not integrated or shared. 1-53

54 Client/Server Architecture The Server (back end) is the DBMS itself. (data definition, data manipulating, data security and integrity). The Clients (front ends) the various applications on top of DBMS. (user-written and built-in applications) Fig. 2.5. 1-54

55 Utilities : Programs designed to help DBA with various administration tasks. Some operates at the external at external level (special purpose application) Other utilities operate directly at the internal level. - Load routines - Unload/reload routines - Reorganization routines - Statistical routines - Analysis routines 1-55

56 Distributed Processing Distributed processing : Distinct machines can be connected into a communication network (ex: Internet) Different levels of DP : –Server on one machine and Clients are on another machine. –Each machine acts as a server for some users and a client for others. –A single client machine might access several different server machines.(one at a time, or simultaneously) –One Server machine and different client machines. Fig 2-6, Fig 2-7 1-56

57 Distributed Database System: A single application should be able to operate on data that is spread across a variety of different databases, managed by a variety of different DBMSs, running on a variety of different machines, supported by a variety of different operating systems and connected by a variety of different communication network Fig 2-8 1-57

58 Relational DataBase Relational Model has three aspects : –Structural aspect –Integrity aspect –Manipulative aspect. In Relational model the database is presented as Tables and nothing but tables. Three main operators : Restrict Project Join 1-58

59 Closure property : The operators that derive tables from tables so the output of one operation can become input to another. All operations are set-at-a-time not row-at-a-time (i.e., all results and operands are tables not rows) Tables are the logical structure not the physical structure. The Information Principle : The entire information content of the database is represented in one and only one way as explicit values in column positions in rows in tables. (No pointers but values) 1-59

60 Integrity Aspect: 1-60


Download ppt "Chapter 1 An Overview of Database Management. 1-2 Topics in this Chapter What is a Database System? What is a Database? Why Database? Data Independence."

Similar presentations


Ads by Google