Download presentation
Presentation is loading. Please wait.
Published byRodger Charles Modified over 9 years ago
1
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application 3.3 The Three Level Architecture 3.3 The Three Level Architecture 3.4 The Data Communications Manager 3.4 The Data Communications Manager 3.5 The Database Administrator 3.5 The Database Administrator 3.6 Client Server Architecture 3.6 Client Server Architecture 3.7 Data Models 3.7 Data Models
2
Components of The DBMS The DBMS consists of of the following components: The DBMS consists of of the following components: 1.Schemas and Subschemas 1.Schemas and Subschemas 2.The Data Definition Language (DDL) 2.The Data Definition Language (DDL) 3.The Data Manipulation Language (DML) 3.The Data Manipulation Language (DML) 4.The Host Language Interface 4.The Host Language Interface 5.The Query Language 5.The Query Language 6.The Data Dictionary 6.The Data Dictionary
3
3.1.1 Schemas and Subschemas The schema is the overall logical structure of a database. The schema is the overall logical structure of a database. It is the global plan that controls the organisation and use of data. It is the global plan that controls the organisation and use of data. A schema can also be viewed as a logical representation of the physical database. A schema can also be viewed as a logical representation of the physical database. It gives a complete description of all records, fields, and data relationships It gives a complete description of all records, fields, and data relationships
4
3.1.1 Schemas and Subschemas The schema describes the structure of the database to the DBMS. The schema describes the structure of the database to the DBMS. It also describes the application processing need of the organisation It also describes the application processing need of the organisation
5
Schema-Diagram A displayed schema is a schema diagram. NameStudNo ClassMajor STUDENT CourseName CourseNo CreditHours Department COURSE
6
Schema Diagram CourseNo PrerequisiteNo PREREQUISITE SectId CourseNo Semester Year Instructor StudNo SectIdGrades GRADES SECTION
7
3.1.1 Schemas and Subschemas A subschema is a subset of a schema. A subschema is a subset of a schema. It is the functional database or the user’s view of the database. It is the functional database or the user’s view of the database. When a user requests for a record, this is expressed in terms of the functional database. When a user requests for a record, this is expressed in terms of the functional database.
8
3.1.1 Schemas and Subschemas The data requested is translated from the declarations of the user (subschema) to the declarative structure of the schema. The data requested is translated from the declarations of the user (subschema) to the declarative structure of the schema.
9
3.1.2 Data Definition Language (DDL) The Data Definition Language (DDL) describes the schema to the DBMS. The Data Definition Language (DDL) describes the schema to the DBMS. It converts requests for data generated at terminals or by application programs from the Logical View, the view perceived by the programmer, into the Physical View, the way data is actually stored in the disk. It converts requests for data generated at terminals or by application programs from the Logical View, the view perceived by the programmer, into the Physical View, the way data is actually stored in the disk.
10
3.1.2 Data Definition Language (DDL) The DDL describes the data model in preparation for creation of a physical database. The DDL describes the data model in preparation for creation of a physical database.
11
3.1.3 Data Manipulation Language The Data Manipulation Language (DML)is the mechanism used for retrieving data stored on the disk. The Data Manipulation Language (DML)is the mechanism used for retrieving data stored on the disk. It contains statements that store, access, modify, update or retrieve data. It contains statements that store, access, modify, update or retrieve data. There are two ways of retrieving data from the DBMS: There are two ways of retrieving data from the DBMS:
12
3.1.3 Data Manipulation Language 1.A user can enter command to the DBMS to retrieve a record or a piece of information from the database. 1.A user can enter command to the DBMS to retrieve a record or a piece of information from the database. 2.A user can have the application program issue an internal instruction (called an embedded statement) to the DBMS to retrieve certain data and return it to the program. 2.A user can have the application program issue an internal instruction (called an embedded statement) to the DBMS to retrieve certain data and return it to the program.
13
The Roles of The DDL and DML in a DBMS Environment ApplicationProgram Data model Database DBMS DDL DML Sales Update Disk Files DDL : Interprets the requirements of the application program DML : Retrieves data stored on disk
14
3.1.4 Host Language Interface The Host Language Interface makes it possible for programs written in a high-level language such as COBOL, C or Java to manipulate or access data in the database. The Host Language Interface makes it possible for programs written in a high-level language such as COBOL, C or Java to manipulate or access data in the database. Instructions that are part of the DML are coded into the program and are converted by the host language interface. Instructions that are part of the DML are coded into the program and are converted by the host language interface.
15
3.1.4 Host Language Interface The host language interface acts as a link between the application program and the DBMS. The host language interface acts as a link between the application program and the DBMS. Thus, programmers do not need to learn a language other than the DML to develop database applications. Thus, programmers do not need to learn a language other than the DML to develop database applications.
16
The Host Language Interface Application Program Terminal DBMS Host Language Interface PhysicalDatabase
17
3.1.5 Query Language A Query Language is an English-language facility that allows users with limited or no programming language or computer experience to query the database for information via a display terminal. A Query Language is an English-language facility that allows users with limited or no programming language or computer experience to query the database for information via a display terminal. A user who wants a list of customers who has paid more than RM3500 for merchandise bought, would enter the query: A user who wants a list of customers who has paid more than RM3500 for merchandise bought, would enter the query:
18
3.1.5 Query Language LIST CUSTOMER_NAME IF AMOUNT_PAID >3500. LIST CUSTOMER_NAME IF AMOUNT_PAID >3500. The DBMS then authorises the search and produces a listing of all customers who had made such a purchase. The DBMS then authorises the search and produces a listing of all customers who had made such a purchase.
19
3.1.6 Data Dictionary The Data Dictionary is the portion of the DBMS that stores the schema, the subschema, integrity rules, security information and descriptions of all data items in the database. The Data Dictionary is the portion of the DBMS that stores the schema, the subschema, integrity rules, security information and descriptions of all data items in the database. The data dictionary stores data about data. This is called the metadata. The data dictionary stores data about data. This is called the metadata.
20
How The DBMS Works The DBMS is the software that handles all access to the database. The DBMS is the software that handles all access to the database. A user through the application program requests a record for update. A user through the application program requests a record for update. This requests triggers a set of activities to be handled by the DBMS. The sequence of activities is as follows: This requests triggers a set of activities to be handled by the DBMS. The sequence of activities is as follows:
21
How The DBMS Works 1. DBMS receives a request from an application program to read a record. The program provides the record ID and record name for processing. 2.DBMS inspects the external schema for that user, the conceptual schema and the storage structure definition.
22
How The DBMS Works 3.Using the subschema and schema, the DBMS determines the data needed by the application program. 4.DBMS authorises the transfer of data from the system to the application program. 5.the application program operates on the data in the user work area.
23
3.2 Components of The Database Application A DB application consists of A DB application consists of 1. forms - used for data entry 2. queries - used to query the the database to identify problems or particular situations. 3.reports- a formatted display of data -displayed on the screen or can be printed.
24
3.2 Components of The Database Application menus - are used to organize the application components so that they are more accessible. menus - are used to organize the application components so that they are more accessible. User need only select the topic of the component required. User need only select the topic of the component required.
25
3.2 Components of The Database Application Application programs can be written in a language that is specific to the DBMS or a standard language that interfaces with the DBMS. Application programs can be written in a language that is specific to the DBMS or a standard language that interfaces with the DBMS. Usually written by programmers, hardware vendors or software house. Usually written by programmers, hardware vendors or software house. Microsoft Access uses a version of VISUAL BASIC. Microsoft Access uses a version of VISUAL BASIC.
26
3.3 The Three Levels of The Architecture The 3-level architecture was proposed to achieve the characteristics of the database. The 3-level architecture was proposed to achieve the characteristics of the database. The goal of this architecture is to separate user applications and the physical database. The goal of this architecture is to separate user applications and the physical database. The 3 levels are; internal level, conceptual level and external level. The 3 levels are; internal level, conceptual level and external level.
27
3.3 The Three-Levels Of The Architecture EXTERNAL LEVEL1 (individual user views) CONCEPTUAL LEVEL (community user view) INTERNAL LEVEL (storage view)... EXTERNAL LEVELn (individual user views)
28
3. 3.1 The Internal Level The internal level (or internal data model or physical model) has an internal schema which describes the physical storage structure of the database. The internal level (or internal data model or physical model) has an internal schema which describes the physical storage structure of the database. The internal model shows how the data is internally represented in the database. The internal model shows how the data is internally represented in the database. It includes the data structures and file organisations used to store the data on hard disk or other physical devices. It includes the data structures and file organisations used to store the data on hard disk or other physical devices.
29
3. 3.1 The Internal Level It describes the complete details of data storage and access paths for the database. It describes the complete details of data storage and access paths for the database. the internal schema is written in the internal DDL the internal schema is written in the internal DDL
30
3.3.2 The Conceptual Schema The conceptual level (or conceptual data model) has a conceptual schema - defines all the users’ requirements in a single description. The conceptual level (or conceptual data model) has a conceptual schema - defines all the users’ requirements in a single description. It hides the details of the physical storage structures and concentrates on describing the structure of the entire information system structure of the database for a community of users as seen by the database administrator. It hides the details of the physical storage structures and concentrates on describing the structure of the entire information system structure of the database for a community of users as seen by the database administrator.
31
3.3.2 The Conceptual Schema Only one conceptual schema is maintained in a database system Only one conceptual schema is maintained in a database system This represents the workings of the organisation. This represents the workings of the organisation. The database administrator has access to the total conceptual view. The database administrator has access to the total conceptual view.
32
3.3.2 The Conceptual Schema Other database users have partial access depending on their needs or predefined requirements. Other database users have partial access depending on their needs or predefined requirements. The conceptual schema is written in the conceptual DDL The conceptual schema is written in the conceptual DDL
33
3.3.2 The Conceptual Schema No data in the database can be accessed, modified or deleted unless they are defined in the conceptual schema. No data in the database can be accessed, modified or deleted unless they are defined in the conceptual schema. The conceptual schema is the basis for developing both the external and internal models. The conceptual schema is the basis for developing both the external and internal models.
34
3.3.3 The External Schema The external level (or view level or external data model) has an external schema or view schema which is the users’ view of the data or of a specific application. The external level (or view level or external data model) has an external schema or view schema which is the users’ view of the data or of a specific application. It is a subset of of the conceptual schema necessary for supporting a particular user view. It is a subset of of the conceptual schema necessary for supporting a particular user view. The external schema is written in the external DDL The external schema is written in the external DDL
35
3.3 The Three Level Architecture It describes the part of the database that the user is interested in and hides the rest of the database from the user. It describes the part of the database that the user is interested in and hides the rest of the database from the user. The three schemas are only descriptions of data. The three schemas are only descriptions of data. The only data that actually exists is at the physical level. The only data that actually exists is at the physical level. Each user group refers only to their own external level. Each user group refers only to their own external level.
36
3.3.3 Mappings The three level architecture contains two levels of mappings. The three level architecture contains two levels of mappings. The conceptual/internal mapping defines the correspondence between the conceptual view and the stored database. The conceptual/internal mapping defines the correspondence between the conceptual view and the stored database. It specifies how conceptual records and fields are represented at the internal level. It specifies how conceptual records and fields are represented at the internal level.
37
3.3.3 Mappings Any changes made to the internal structure definition must be reflected in the conceptual/internal mapping. Any changes made to the internal structure definition must be reflected in the conceptual/internal mapping. An external/conceptual mapping defines the correspondence between a particular external view and the conceptual view An external/conceptual mapping defines the correspondence between a particular external view and the conceptual view
38
3.4 The Data Communications Manager Any database requests from a user are transmitted from the user’s terminal to the online application and then to the DBMS in the form of communication messages. Any database requests from a user are transmitted from the user’s terminal to the online application and then to the DBMS in the form of communication messages. Any response back to the user from the DBMS and online application are also transmitted in the form of such messages. Any response back to the user from the DBMS and online application are also transmitted in the form of such messages.
39
The Data Communications Manager These message transmissions take place under the direction of another software system, i.e. the data communications manager (DC manager). These message transmissions take place under the direction of another software system, i.e. the data communications manager (DC manager). The DC is not part of the DBMS but is an autonomous system. The DC is not part of the DBMS but is an autonomous system.
40
The Data Communications Manager The DBMS looks after the database while the DC manager handles all messages to and from the DBMS. The DBMS looks after the database while the DC manager handles all messages to and from the DBMS.
41
DBA The database administrator (DBA) is the person responsible for administering the database resources. The database administrator (DBA) is the person responsible for administering the database resources. The DBA The DBA Authorises access to the database Authorises access to the database Coordinates and monitors the use of the database Coordinates and monitors the use of the database Acquires the hardware and software resources as needed Acquires the hardware and software resources as needed Is accountable for the security of the database system Is accountable for the security of the database system Manages the system in terms of response time etc. Manages the system in terms of response time etc.
42
The Database Administrator The database administrator (DBA) is the person who is responsible for the overall control of the database system at a technical level. The database administrator (DBA) is the person who is responsible for the overall control of the database system at a technical level. The DBA is in charge of : The DBA is in charge of : 1.Defining the conceptual schema 1.Defining the conceptual schema 2.Defining the internal schema 2.Defining the internal schema 3.Lasing with users 3.Lasing with users
43
The Database Administrator 4.Defining security and integrity checks 4.Defining security and integrity checks 5.Defining backup and recovery procedures 5.Defining backup and recovery procedures 6.Monitoring performance and responding to changing requirements 6.Monitoring performance and responding to changing requirements The role of a DBA is explained in greater detail in Chap.6. The role of a DBA is explained in greater detail in Chap.6.
44
Client/Server Architecture End Users Clients Server Database Applications DBMS
45
Client/Server Consists of a server (backend) and a set of clients (frontend) Consists of a server (backend) and a set of clients (frontend) User interface and application programs moved to the client end. User interface and application programs moved to the client end. SQL became the dividing point between client and server SQL became the dividing point between client and server Query and Transaction functions remained in the server end (sometimes called query server or transaction server) Query and Transaction functions remained in the server end (sometimes called query server or transaction server)
46
Server The server is the DBMS. It stores the data The server is the DBMS. It stores the data Supports all the basic functions of the DBMS, i.e. data definition, data manipulation, data security and integrity etc. Supports all the basic functions of the DBMS, i.e. data definition, data manipulation, data security and integrity etc. Provides all the external, conceptual and internal support Provides all the external, conceptual and internal support In this context - just another name for the DBMS. In this context - just another name for the DBMS. IN RDBMS it is called a SQL server since RDBMS servers are based on the SQL language IN RDBMS it is called a SQL server since RDBMS servers are based on the SQL language
47
Client Access the data stored in server. Access the data stored in server. Clients are all the applications and the user interface that run on the DBMS Clients are all the applications and the user interface that run on the DBMS I.e. user written applications and built-in applications I.e. user written applications and built-in applications Clients can communicate with the DBMS through Application Programming Interface (API) provided by the Open Database Connectivity (ODBC) standard Clients can communicate with the DBMS through Application Programming Interface (API) provided by the Open Database Connectivity (ODBC) standard
48
SUMMARY A database is a collection of integrated files shared by many users and capable of handling many applications. A database is a collection of integrated files shared by many users and capable of handling many applications. A DBMS is the software that access the information stored in the database. A DBMS is the software that access the information stored in the database.
49
SUMMARY The DBMS allows for : The DBMS allows for : data integration - pooling the files in a central location data integration - pooling the files in a central location data sharing - allowing all users access through data integration data sharing - allowing all users access through data integration minimum data duplication minimum data duplication independence of physical file format. independence of physical file format.
50
SUMMARY The DBMS supports 4 main types of language: The DBMS supports 4 main types of language: The DDL is used to define the database schemas. The DDL is used to define the database schemas. The DML is used for specifying database updates and retrievals. The DML is used for specifying database updates and retrievals. The Host Interface Language allows programs written in hihg- level language to be manipulated in the database. The Host Interface Language allows programs written in hihg- level language to be manipulated in the database.
51
SUMMARY The query language allows users to query the database for information. The query language allows users to query the database for information. The 3 level architecture is proposed as a way of achieving the database characteristics of data independence. The 3 level architecture is proposed as a way of achieving the database characteristics of data independence. The conceptual schema defines all the users’ database requirements into a single database description The conceptual schema defines all the users’ database requirements into a single database description
52
SUMMARY The external schema is the users’ view of the data. The external schema is the users’ view of the data. The internal data model shows how data is internally represented in the database. The internal data model shows how data is internally represented in the database. The data communications manager is the software that handles message transmission between a user and the DBMS. The data communications manager is the software that handles message transmission between a user and the DBMS.
53
SUMMARY The database administrator is the person who controls the overall database system from a technical point. The database administrator is the person who controls the overall database system from a technical point.
54
Q & A h_khanpour@yahoo.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.