Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
39 views39 pages

1chap Cs Archi

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 39

The Database Environment

1. DBMS Component Modules


  A DBMS is a complex software system.
 The figure is divided into two parts.
 The top part of the figure refers to the various users of the
database environment and their interfaces.
 The lower part shows the internals of the DBMS responsible
for storage of data and processing of transactions.
 The database and the DBMS catalog are usually stored on disk.
 Access to the disk is controlled primarily by the operating
system (OS), which schedules disk read/write.
 Many DBMSs have their own buffer management module to
schedule disk read/write, because this has a considerable effect on
performance.
 A higher-level stored data manager module of the DBMS
controls access to DBMS information that is stored on disk,
whether it is part of the database or the catalog.
 Top part of Figure shows interfaces for the DBA staffs-works on
defining the database and tuning it by making changes to its
definition using the DDL and other privileged commands.
 casual users who work with interactive interfaces to formulate
queries.
 application programmers who create programs using some host
programming languages: Ada, ALGOL (Burroughs B5000),
BASIC, BCPL, C, C++, C#.
 parametric users who do data entry work by supplying parameters
to predefined transactions.
  The DDL compiler processes schema definitions, specified in
the DDL, and stores descriptions of the schemas (meta-data)
in the DBMS catalog.
 The catalog includes information such as the names and
sizes of files, names and data types of data items, storage
details of each file, mapping information among schemas,
and constraints.  
 Casual users and persons with occasional need for
information from the database interact using some form of
interface, which we call the interactive query interface
 Queries are parsed and validated for correctness of the query
syntax, the names of files and data elements, and so on by a query
compiler that compiles them into an internal form.

 The query optimizer is concerned with the rearrangement and


possible reordering of operations, elimination of redundancies, and
use of correct algorithms and indexes during execution.

 Application programmers write programs in host languages such as


Java, C, or C++ that are submitted to a pre-compiler.
 The precompiler extracts DML commands from an application
program written in a host programming language.

 These commands are sent to the DML compiler for compilation


into object code for database access.

 The rest of the program is sent to the host language compiler. The
object codes for the DML commands and the rest of the program
are linked, forming a canned transaction whose executable code
includes calls to the runtime database processor.
 Canned transactions are executed repeatedly by parametric
users, who simply supply the parameters to the transactions.
 An example is a bank withdrawal transaction where the
account number and the amount may be supplied as
parameters.
 In the lower part of Figure 2.3, the runtime database
processor executes (1) the privileged commands, (2) the
executable query plans, and (3) the canned transactions with
runtime parameters. It works with the system catalog and
update it with statistics.
 It also works with the stored data manager, which in turn
uses basic operating system services for carrying out low-
level input/output (read/write) operations between the disk
and main memory.
 The runtime database processor handles other aspects of
data transfer, such as management of buffers in the main
memory.
 Some DBMSs have their own buffer management module
while others depend on the OS for buffer management.
 Concurrency control, backup and recovery systems  are
integrated into the working of the runtime database
processor for purposes of transaction management.
2. Database System Utilities    
 DBMSs have database utilities that help the DBA to manage the
database system. Common utilities have the following types of
functions:                       
 Loading. A loading utility is used to load existing data files- such as
text files or sequential files- into the database. Usually, the current
(source) format of the data file and the desired (target) database file
structure are specified to the utility, which then automatically reformats
the data and stores it in the database.
 Conversion tools. For the hierarchical DBMS called IMS (IBM) and
for many network DBMSs including IDMS (Computer Associates),
SUPRA (Cincom), and IMAGE (HP), the vendors or third-party
companies are making a variety of conversion tools available (e.g.,
Cincom’s SUPRA Server SQL) to transform data into the relational
model.0.3
 Backup. A backup utility creates a backup copy of the
database, usually by dumping the entire database onto tape
or other mass storage medium.
 The backup copy can be used to restore the database in case
of catastrophic disk failure.
 Incremental backups are also often used, where only
changes since the previous backup are recorded.
 Incremental backup is more complex, but saves storage
space.
 Database storage reorganization. This utility can be used
to reorganize a set of database files into different file
organizations, and create new access paths to improve
performance. Ex: Sequential, Heap, Hash, B+ Tree,
Clustered 
 Performance monitoring. Such a utility monitors database
usage and provides statistics to the DBA.
 The DBA uses the statistics in making decisions such as
whether or not to reorganize files or whether to add or drop
indexes to improve performance.
  Other utilities may be available for sorting files, handling
data compression, monitoring access by users, interfacing
with the network, and performing other functions.
 3. Tools, Application Environments, and
Communications Facilities

 CASE (computer aided s/w eng)tools are used in the design phase of database
systems.
 data dictionary (or data repository) system-In addition to storing catalog
information about schemas and constraints, the data dictionary stores other
information, such as design decisions, usage standards, application program
descriptions, and user information.
 Such a system is also called an information repository. This information can
be accessed directly by users or the DBA when needed.
 A data dictionary utility is similar to the DBMS catalog, but it includes a
wider variety of information and is accessed mainly by users rather than by
the DBMS software.
 Application development environments, such as PowerBuilder
(Sybase) or JBuilder (Borland). These systems provide an
environment for developing database applications and include
facilities that help in many facets of database systems, including
database design, GUI development, querying and updating, and
application program development. 
  communications software, whose function is to allow users to
access the data-base through computer terminals, workstations, or
personal computers.
 These are connected to the database site through data
communications hardware such as Internet routers, phone lines,
long-haul networks, local networks, or satellite communication
devices.
Centralized and Client-
Server Architectures
Centralized database

 A centralized database is stored at a single location such as


a mainframe computer (provide the main processing for all
system functions). It is maintained and modified from that
location only and usually accessed using an internet
connection such as a LAN or WAN.
 Example colleges, companies, banks etc.
 Basic Client/Server Architectures

 The client/server architecture was developed to deal with computing


environments in which a large number of PCs, workstations, file
servers, printer server, database servers, Web servers, e-mail servers,
and other software and equipment are connected via a network.
 The idea is to define specialized servers with specific functionalities. 
 For example, it is possible to connect a number of PCs or small
workstations as clients to a file server that maintains the files of the
client machines. 
 The resources provided by specialized servers can be accessed by many client
machines.
 A client in this framework is typically a user machine that provides user
interface capabilities and local processing. When a client requires access to
additional functionality— such as database access—that does not exist at that
machine, it connects to a server that provides the needed functionality.
 A server is a system containing both hard-ware and software that can provide
services to the client machines, such as file access, printing, archiving, or
database access.
Two Tier Client-Server
Architecture
• User Interface Programs and Application Programs run
on the client side
• Interface called ODBC (Open Database Connectivity )
provides an Application program interface (API) allow
client side programs to call the DBMS.
 A client program may connect to several DBMSs.
Logical two-tier client/server
architecture
Physical two-tier client-server
architecture.
Two-Tier Client/Server
Architectures for DBMSs
 The user interface programs and application programs can
run on the client side.
 When DBMS access is required, the program establishes a
connection to the DBMS (which is on the server side); once
the connection is created, the client program can
communicate with the DBMS with standard called Open
Database Connectivity.
 (ODBC) provides an application programming
interface (API), which allows client-side programs to call
the DBMS, as long as both client and server machines have
the necessary software installed.
Three Tier Client-Server
Architecture
• Common for Web applications
• Intermediate Layer called Application Server or
Web Server:
• stores the web connectivity software and the rules and
business logic (constraints) part of the application used
to access the right amount of data from the database
server acts like a conduit for sending partially processed
data between the database server and the client.
• Additional Features- Security:
• encrypt the data at the server before transmission
• decrypt data at the client
Logical three-tier client/server
architecture
n-Tier Architectures for Web
Applications
 Bottom layer in three-tier architecture includes all data
management services.
 If the bottom layer is split into two layers (a web server and
a database server), then this becomes a four tier architecture.
 Layers between user and the stored data can be defined into
finer components, thus gives n-tier architecture
Classification of DBMSs

Based on number of users:


 Single User Systems:  support only one user at a time and
are mostly used with PCs
 Multiuser Systems: which include the majority of DBMSs,
support con-current multiple users.
Based on number of sites

 Centralized DBMS: Data is stored at single computer


site
 Distributed DBMS: Database and DBMS software are
distributed over many sites.
Homogeneous: Same DBMS software at multiple sites
Heterogeneous: can use different DBMS software at
each site.
It is also possible to develop middleware software to
access several autonomous preexisting databases
stored under heterogeneous DBMSs
Based on cost:

 Open Source DBMS: Main RDBMS


products like MySQL, PostgreSQL 
 License based
 Sitelicense allow unlimited use of
database system with any number of
copies running at customer site. (trial
version)
 License limits the number of concurrent
users at a location.($300)
Based on cost:
 Standalone single user versions are sold per copy or included in
desktop or laptop configuration, ACCESS

 Additional features can be made available in any of the above kind


at extra cost
Based on purpose of use

 General Purpose: These DBMS systems can be used for


variety of applications. oracle

 Special Purpose: A DBMS system is designed for a special


application e.g. Online transaction processing (OLTP),
which must support a large number of concurrent
transactions without imposing excessive delays.
Based on data model

 Hierarchical data model


 Network data model
 Object data model
 Relational data model
 Object-Relational data model
 Hierarchical data model is constructed using a tree model,
with one root and several levels of subtrees.
 There is no standard language for hierarchical model.

 A popular hierarchical DML is DL/1 of the IMS system


which dominated market for 20 years (1965-1985).

 DL/1 has commands to locate a record e.g.


GET {UNIQUE, NEXT} <record-type> WHERE <condition>
 Network data model contains many links among various
items of the data.
 This model organizes data using two fundamental
constructs, called records and sets.
 Records contain fields, and sets define one-to-many
relationships between records: one owner, many members.
It provides commands for locating records directly e.g.
FIND ANY <record-type>USING <field-list>
FIND DUPLICATE <record-type>USING <field-list>
Object data model

 based on object oriented approach i.e. objects, classes with


their attributes and operations.
 ODMG (Object Data Management Group) object model
provides standards for commercial object data model.
Relational data model

 represents the database as a collection of relations.


 Example: MySQL, Oracle, SQL Server etc.
Object-Relational data model

 relational model having the capabilities of object database.


 objects, classes and inheritance are directly supported in
database schemas and in the query language
Example: Informix Universal Server, Oracle (due to
enhanced features), Data blades (Informix), Cartridges
(Oracle)
eXtended Markup Language
Model (XML)
 XML is standard for data interchange over the Internet, also
uses hierarchical tree structures.
 It combines database concepts with concepts from
document representation models.
 Data is represented as elements with the use of tags, data
can be nested to create complex hierarchical structures.
 This model conceptually resembles the object model, but
use different terminology.

You might also like