Database Systems M AHMAD ABBAS Dept. of Computer Science Lecture 2
Today’s Agenda DBMS Functions Managing Database Systems Database Architecture
Background About Previous lecture, So, What actually Database is ? What Data is? Anyone knows about information ? Any example of data as well as information? What DBMS is? DB Environment?
DBMS Functions Most functions are transparent to end users Can only be achieved through the DBMS Data dictionary management DBMS stores definitions of data elements and relationships (metadata) in a data dictionary Changes automatically recorded in the dictionary DBMS provides data abstraction and removes structural and data dependency 4
5
DBMS Functions (cont'd.) Data storage management DBMS creates and manages complex structures required for data storage Also stores related data entry forms, screen definitions, report definitions, etc. Performance tuning : activities that make the database perform more efficiently DBMS stores the database in multiple physical data files 6
7
DBMS Functions (cont'd.) Data transformation and presentation DBMS transforms data entered to conform to required data structures DBMS transforms physically retrieved data to conform to user’s logical expectations Security management DBMS creates a security system that enforces user security and data privacy Security rules determine which users can access the database, which items can be accessed, etc. 8
DBMS Functions (cont'd.) Multiuser access control DBMS uses sophisticated algorithms to ensure concurrent access does not affect integrity Backup and recovery management DBMS provides backup and data recovery to ensure data safety and integrity Recovery management deals with recovery of database after a failure Critical to preserving database’s integrity 9
DBMS Functions (cont'd.) Data integrity management DBMS promotes and enforces integrity rules Minimizes redundancy Maximizes consistency Data relationships stored in data dictionary used to enforce data integrity Integrity is especially important in transaction-oriented database systems 10
DBMS Functions (cont'd.) Database access languages and application programming interfaces DBMS provides access through a query language Query language is a nonprocedural language Structured Query Language (SQL) is the de facto query language Standard supported by majority of DBMS vendors 11
DBMS Functions (cont'd.) Database communication interfaces Current DBMSs accept end-user requests via multiple different network environments Communications accomplished in several ways: End users generate answers to queries by filling in screen forms through Web browser DBMS automatically publishes predefined reports on a Web site DBMS connects to third-party systems to distribute information via e-mail 12
Managing the Database System: A Shift in Focus Database system provides a framework in which strict procedures and standards enforced Role of human changes from programming to managing organization’s resources Database system enables more sophisticated use of the data Data structures created within the database and their relationships determine effectiveness 13
Managing the Database System: A Shift in Focus (cont'd.) Disadvantages of database systems: Increased costs Management complexity Maintaining currency Vendor dependence Frequent upgrade/replacement cycles 14
Jan 29, 2002 Database Schemas Is the description of the database ( not database itself ) Specified during database design Not expected to change frequently A displayed schema is called a schema diagram (Fig 2.1) Each object in the schema-such as STUDENT or COURSE-is a schema construct. Schema diagram represents only some aspects of a schema (name of record type, data element and some type of constraint)
Jan 29, 2002
Instances and Database State The data in the database at a particular moment in time is called a database state or snapshot or current set of occurrences or instances in the database When we define a new database we have database state is empty state (schema specified only in DBMS) The initial state when the database is first populated Then At any point in time, the database has a current state schema evolution: when we need to change the schema
The Three-Schema Architecture Importance of using DB approach insulation of programs and data support of multiple user views use of a catalog to store the database description (schema). The aim is to separate the user application and physical DB schema can be defined into three levels: The internal level has an internal schema describes the physical storage structure of the database. uses a physical data model
Jan 29, 2002
The Three-Schema Architecture The conceptual level has a conceptual schema describing the structure of the whole database for a community of users. It hides the details of physical storage structures and concentrates on describing entities, data types, relationships.
A high-level data model or an implementation data model can be used at this level. The external level includes a number of external schemas or user views describing the part of the db that a particular user group is interested in and hides the rest of the db from that user group. A high-level data model or an implementation data model can be used at this level. The Three-Schema Architecture
External view The user’s view of the database. Consists of a number of different external views of the DB. Describes part of the DB for particular group of users. Provides a powerful and flexible security mechanism by hiding parts of the DB from certain users . It permits users to access data in a way that is customized to their needs, so that the same data can be seen by different users in different ways, at the same time.
Conceptual View The logical structure of the entire database as seen by DBA. What data is stored in the database. The relationships among the data. Complete view of the data requirements of the organization, independent of any storage consideration.
Physical View Managed by the OS under the direction of the DBMS. SCHEMAS, MAPPINGS, INSTANCES DB schema : overall description of the DB. Three different schemas according to the level of abstraction. DBMS: mapping between schemas consistency of schemas
Happiness is not gaining money Happiness is live life at your own terms!! if u like this plz subscribe our channel to get more updates