Академический Документы
Профессиональный Документы
Культура Документы
UNIT I
Database Applications:
Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions
10
11
Definition of DBMS
A Database Management System is a collection of programs that enables users to create and maintain a database. It is a general purpose software system that facilitates processes of defining, constructing and manipulating databases for various applications.
Controlling Redundancy
12
Data Models
Data Model: A set of concepts to describe the structure of a database- provides the necessary means to achieve the abstraction, and certain constraints that the database should obey. Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model. Operations on the data model may include basic operations and user-defined operations.
14
In software engineering, an entity-relationship model (ERM) is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDs.
16
17
18
19
20
21
22
previous
23
Hierarchical Model
ADVANTAGES:
Hierarchical Model is simple to construct and operate on Corresponds to a number of natural hierarchically organized domains - e.g., assemblies in manufacturing, personnel organization in companies Language is simple; uses constructs like GET, GET UNIQUE, GET NEXT, GET NEXT WITHIN PARENT etc.
DISADVANTAGES:
Navigational and procedural nature of processing Database is visualized as a linear arrangement of records Little scope for "query optimization"
24
Network Model
ADVANTAGES:
Network Model is able to model complex relationships and represents semantics of add/delete on the relationships. Can handle most situations for modeling using record types and relationship types. Language is navigational; uses constructs like FIND, FIND member, FIND owner, FIND NEXT within set, GET etc. Programmers can do optimal navigation through the database.
DISADVANTAGES:
Navigational and procedural nature of processing Database contains a complex array of pointers that thread through a set of records. Little scope for automated "query optimization
25
28
29
Data Models
model
30
Entity-Relationship Model
31
design in E-R model usually converted to design in the relational model (coming up next) which is used for storage and processing
32
Relational Model
Proposed in 1970 by E.F. Codd (IBM), first commercial
system in 1981-82. Now in several commercial products (e.g. DB2, ORACLE, MS SQL Server, SYBASE, INFORMIX). Several free open source implementations, e.g. MySQL, PostgreSQL Currently most dominant for developing database applications. SQL relational standards: SQL-89 (SQL1), SQL-92 (SQL2), SQL-99, SQL3,
33
Three-Schema Architecture
Proposed to support DBMS characteristics of:
Program-data independence Support of multiple views of the data
Mappings among schema levels are needed to transform requests and data. Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution.
34
Three-Schema Architecture
Defines DBMS schemas at three levels:
Internal schema at the internal level to describe physical storage structures and access paths. Typically uses a physical data model. Conceptual schema at the conceptual level to describe the structure and constraints for the whole database for a community of users. Uses a conceptual or an implementation data model. External schemas at the external level to describe the various user views. Usually uses the same data model as the conceptual level.
35
36
Three-Schema Architecture
Mappings among schema levels are needed to transform requests and data.
Programs refer to an external schema, and are
mapped by the DBMS to the internal schema for execution. Data extracted from the internal DBMS level is reformatted to match the users external view (e.g. formatting the results of an SQL query for display in a Web page)
37
Data Independence
Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their application programs. Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema.
38
Data Independence
When a schema at a lower level is changed, only the mappings between this schema and higher-level schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas.
39
DBMS Languages
40
DBMS Languages
Data Definition Language (DDL): Used by the DBA and database designers to specify the conceptual schema of a database. In many DBMSs, the DDL is also used to define internal and external schemas (views). In some DBMSs, separate storage definition language (SDL) and view definition language (VDL) are used to define internal and external schemas.
41
42
Low Level or Procedural Languages: record-at-atime; they specify how to retrieve data and include constructs such as looping.
43
DBMS Interfaces
Stand-alone query language interfaces. Programmer interfaces for embedding DML in programming languages:
Pre-compiler Approach Procedure (Subroutine) Call Approach
User-friendly interfaces:
Menu-based, popular for browsing on the web Forms-based, designed for nave users Graphics-based (Point and Click, Drag and Drop etc.) Natural language: requests in written English Combinations of the above
44
DBMS Programming Language Interfaces Programmer interfaces for embedding DML in a programming languages:
Embedded Approach: e.g embedded SQL (for C, C++, etc.), SQLJ (for Java) Procedure Call Approach: e.g. JDBC for Java, ODBC for other programming languages Database Programming Language Approach: e.g. ORACLE has PL/SQL, a programming language based on SQL; language incorporates SQL and its data types as integral components
45
46
Database Users
Users are differentiated by the way they expect to interact with the system
Application
programmers interact with system through users form requests in a database query
DML calls
Sophisticated
language
users write specialized database applications that do not fit into the traditional data processing framework
Specialized Nave
users invoke one of the permanent application programs that have been written previously
Examples, people accessing database over the web, bank
Database Administrator(DBA)
Coordinates
all the activities of the database system; the database administrator has a good understanding of the enterprises information resources and needs.
Database
requirements
48
Other Tools
Data dictionary / repository:
Used to store schema
descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc.
49
50
DBMS SERVER
Provides database query and transaction services to the clients Sometimes called query and transaction servers
CLIENT
Provide appropriate interfaces and a client-version of the system to access and utilize the server resources. Clients maybe diskless machines or PCs or Workstations with disks with only the client software installed. Connected to the servers via some form of a network. (LAN: local area network, wireless network, etc.)
51
Interface called ODBC (Open Database Connectivity) provides an Application program interface (API) allow client side programs to call the DBMS. Most DBMS vendors provide ODBC drivers.
A client program may connect to several DBMSs.
52
Classification of DBMSs
Based on the data model used:
Traditional: Relational, Network, Hierarchical. Emerging: Object-oriented, Object-relational.
Other classifications:
Single-user (typically used with micro- computers) vs. multi-user (most DBMSs). Centralized (uses a single computer with one database) vs. distributed (uses multiple computers, multiple databases) Distributed Database Systems have now come to be known as client server based database systems because they do not support a totally distributed environment, but rather a set of database servers supporting a set of clients.
54
55
Solution
Whenever an area needs painting, or replacement fixtures are needed then the Building Information database is searched. The search can be done on a single building or across all buildings and the database has developed into a valuable resource. It is possible to search for door furniture for example and then drill down to door handles and find all the different types, together with their suppliers and the price at the last supply date. Paint colours are also stored and are searched in the same way. This application now saves valuable time in finding replacement items and in addition it is helping to rationalize supply and save costs.
56