Three Level Database Architecture Show
Transcript of Three Level Database Architecture Show
-
8/8/2019 Three Level Database Architecture Show
1/28
-
8/8/2019 Three Level Database Architecture Show
2/28
Data are actually stored as bits, or numbersand strings, but it is difficult to work withdata at this level.It is necessary to view dataat different levels of abstraction.
Schema:
Description of data at some level. Each levelhas its own schema.
We will be concerned with three forms ofschemas:
physical,
conceptual, and
external.
-
8/8/2019 Three Level Database Architecture Show
3/28
the internal scheme describes the data from a viewvery close to the computer or system in general. Itcompletes the logical scheme with data technicalaspects like storage methods or help functions for
more efficiency. Provide concepts that describe details of how
data is stored in the computer
Problem:
Routines are hardcoded to deal with physical
representation. Changes to data structures are difficult to make.
Application code becomes complex since it must dealwith details.
Rapid implementation of new features very difficult.
-
8/8/2019 Three Level Database Architecture Show
4/28
Provide concepts that are close to the way manyusersperceive data.
Entities,attribute,their relationships
All constraints Security &integrity information
-
8/8/2019 Three Level Database Architecture Show
5/28
In external data scheme describes theinformation about the user view of specificusers (single users and user groups) and the
specific methods and constraints connectedwith this information.
Examples:
Students should not see faculty salaries.
Faculty should not see billing or paymentdata.
-
8/8/2019 Three Level Database Architecture Show
6/28
Mappings among schema levels are needed totransform requests and data. Programs refer toan external schema, and are mapped by the
DBMS to the internal schema for execution. Conceptual/internal mapping External /conceptual mapping
-
8/8/2019 Three Level Database Architecture Show
7/28
-
8/8/2019 Three Level Database Architecture Show
8/28
Logical Data Independence: The capacity tochange the conceptual schema without having tochange the external schemas and theirapplication programs.
Physical Data Independence: The capacity tochange the internal schema without having tochange the conceptual schema
When a schema at a lower level ischanged, only the mappings between thisschema and higher-level schemas need to bechanged in a DBMS that fully supports dataindependence. The higher-level schemasthemselves are unchanged. Hence, theapplication programs need not be changed sincethey refer to the external schemas.
-
8/8/2019 Three Level Database Architecture Show
9/28
Externalschema
Conceptualschema
Internalschema
Physical data
independendence
Logical dataindependence
-
8/8/2019 Three Level Database Architecture Show
10/28
DBMS LanguagesDBMS Languages
provide appropriate languages andprovide appropriate languages andinterfaces for each category of usersinterfaces for each category of users
Data Definition Language (DDL): Used bythe DBA and database designers to specify theconceptual schema of a database. In manyDBMSs, the DDL is also used to define internal
and external schemas (views). In some DBMSs,separate storage definition language (SDL) andview definition language (VDL) are used todefine internal and external schemas
-
8/8/2019 Three Level Database Architecture Show
11/28
Creation of tables and definition ofattributes (CREATE TABLE ...)
Change of tables by adding or deleting
attributes (ALTER TABLE )Deletion of whole table including content (!)
(DROP TABLE )
-
8/8/2019 Three Level Database Architecture Show
12/28
Data Manipulation Language (DML):
Typical DML operations (with theirrespective keywords in the structured
query language SQL):
Add data (INSERT)
Change data (UPDATE)
Delete data (DELETE)Query data (SELECT)
-
8/8/2019 Three Level Database Architecture Show
13/28
Procedural DML:
in which the user specifies what data is needed and how to get it;
Also called record-at-a-time (record-oriented) or low-level DML
Must be embedded in a programming language.
Searches for and retrieves individual database records and useslooping and other constructs of the host programming languageto retrieve multiple records.
Examples of these are Oracle's PL/SQL and DB2's SQL PL.
-Declarative or non-procedural DML:
in which the user specifies only what data is needed.
Also called set-at-a-time (set-oriented) or high-level DML.
Can be used as a stand-alone query language or can beembedded in a programming language.
Searches for and retrieves information from multiple relateddatabase records in a single command.
-
8/8/2019 Three Level Database Architecture Show
14/28
Working Principle of a Database Interface
-
8/8/2019 Three Level Database Architecture Show
15/28
Following, two important uses of a databaseinterface like SQL are listed:
Interactive :SQL can be used interactively
from a terminal. Embedded :SQL can be embedded into
another language (host language) whichmight be used to create a database
application.
-
8/8/2019 Three Level Database Architecture Show
16/28
A user interface is the view of a databaseinterface that is seen by the user. Userinterfaces are often graphical or at least partlygraphical (GUI - graphical user interface)constructed and offer tools which make theinteraction with the database easier.
Form-based Interfaces:-
This interface consist of forms which areadapted to the user. He/She can fill in all of thefields and make new entries to the database or
only some of the fields to query the other ones
-
8/8/2019 Three Level Database Architecture Show
17/28
-
8/8/2019 Three Level Database Architecture Show
18/28
Text-based Interface:-
Text-based Interfaces To be able to administratethe database or for other professional users
there are possibilities to communicate with theDBMS directly in the query language (in codeform) via a input/output window
.
-
8/8/2019 Three Level Database Architecture Show
19/28
-
8/8/2019 Three Level Database Architecture Show
20/28
A GIS user interface often integrates featuresof a database interface. The databaseinteraction takes place through the
combination of different interfaces:Graphical interaction via a selection on themap
Combination of form-based and text-based
interaction (e.g. special Query-Wizards forthe easier creation of database queries)
-
8/8/2019 Three Level Database Architecture Show
21/28
-
8/8/2019 Three Level Database Architecture Show
22/28
- Interfaces for Parametic Users (usingfunction keys)
- Interfaces for the DBA:
-Creating accounts, grantingauthorizations
-Setting system parameters-Changing schemas or access path
-
8/8/2019 Three Level Database Architecture Show
23/28
The Database SystemThe Database SystemEnvironmentEnvironment
-
8/8/2019 Three Level Database Architecture Show
24/28
-
8/8/2019 Three Level Database Architecture Show
25/28
Disk access control Stored Data Manager
OS
Buffer Manager Module
Compilers DDL Compiler
Query Compiler
DML Compiler
Precompiler/Host language compiler Handling DB access at runtime Runtime database processor
Catalog
-
8/8/2019 Three Level Database Architecture Show
26/28
DBMs utilities are that helps the DBA to manage theDB.To perform certain functions such as:
Loading data stored in files into a database.
--Conversion tool
Backingup the database periodically on storage.
File reorganizingdatabase file structures.
Report generation utilities.
Performance monitoring utilities.
Other functions, such as sorting,user monitoring,data compression, etc.
-
8/8/2019 Three Level Database Architecture Show
27/28
Tools are used by database designers and DBA
1. Case Tools:-Design the phases of DB.
2. Data dictionary/repository:-
Used to store schema descriptions and otherinformation such as designdecisions, application program descriptions,
user information, usage standards, etc.
- Active data dictionary is accessed by DBMSsoftware and users/DBA.
- Passive data dictionary is accessed by users/DBA
only.
-
8/8/2019 Three Level Database Architecture Show
28/28
Based on the data model used:
Data models
-Traditional: Relational, Network (see 2-19), Hierarchical
- Emerging: Object-oriented, Semantic, Entity- Relationship, other.
Other classifications:
Number of users : Single-user (typically used with personal computers) vs.multi-user (most DBMSs)
Number of sites:Centralized (uses a single computer) vs. distributed (uses multiple computers).Homogeneous vs. Heterogeneous
Cost of DBMS software. $10,000~100,000$100~3,000
Types of access paths used. (inverted file structures, )
Purpose general purpose
special purposee.g. airline reservations, telephone directory, on-line transaction
processing system