Database Management Systems
Database Management Systems
What Is a DBMS?
A very large, integrated collection of data. Models real-world enterprise. Entities (e.g., students, courses) Relationships (e.g., Bala is taking LT9402) A Database Management System (DBMS) is a software package designed to store and manage databases.
Data independence and efficient access. Reduced application development time. Data integrity and security. Uniform data administration. Concurrent access, recovery from crashes.
Shift from computation to information at the low end: scramble to webspace (a mess!) at the high end: scientific applications Datasets increasing in diversity and volume. Digital libraries, interactive video, Human Genome project, EOS project ... need for DBMS exploding DBMS encompasses most of CS OS, languages, theory, AI, multimedia, logic
Levels of Abstraction
Physical level: describes how a record (e.g., customer) is stored. Logical level: describes data stored in database, and the relationships among the data. type customer = record customer_id : string; customer_name : string; customer_street : string; customer_city : string; end; View level: application programs hide details of data types. Views can also hide information (such as an employees salary) for security purposes.
Summary
DBMS used to maintain, query large datasets. Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security. Levels of abstraction give data independence. A DBMS typically has a layered architecture. DBAs hold responsible jobs and are well-paid! DBMS R&D is one of the broadest, most exciting areas in CS.
View of Data
An architecture for a database system
Slide No:L2-1
Data Models
A collection of tools for describing Data Data relationships Data semantics Data constraints Relational model Entity-Relationship data model (mainly for database design) Object-based data models (Object-oriented and Object-relational) Semi structured data model (XML) Other older models: Network model Hierarchical model
Data Models
A data model is a collection of concepts for describing data. A schema is a description of a particular collection of data, using the a given data model. The relational model of data is the most widely used model today.
Main concept: relation, basically a table with rows and columns. Every relation has a schema, which describes the columns, or fields.
Data Independence
Applications insulated from how data is structured and stored. Logical data independence: Protection from changes in logical structure of data. Physical data independence: Protection from changes in physical structure of data.
One of the most important benefits of using a DBMS!
SQL
SQL: widely used non-procedural language Example: Find the name of the customer with customer-id 192-83-7465 select customer.customer_name from customer where customer.customer_id = 192-83-7465 Example: Find the balances of all accounts held by the customer with customer-id 192-83-7465 select account.balance from depositor, account where depositor.customer_id = 192-83-7465 and depositor.account_number = account.account_number
SQL
Application programs generally access databases through one of Language extensions to allow embedded SQL Application program interface (e.g., ODBC/JDBC) which allow SQL queries to be sent to a database
Database Users
Users are differentiated by the way they expect to interact with the system Application programmers interact with system through DML calls Sophisticated users form requests in a database query language Specialized users write specialized database applications that do not fit into the traditional data processing framework Nave users invoke one of the permanent application programs that have been written previously Examples, people accessing database over the web, bank tellers, clerical staff
Database Administrator
Coordinates all the activities of the database system has a good understanding of the enterprises information resources and needs. Database administrator's duties include: Storage structure and access method definition Schema and physical organization modification Granting users authority to access the database Backing up data Monitoring performance and responding to changes Database tuning
Database Architecture
The architecture of a database systems is greatly influenced by the underlying computer system on which the database is running: Centralized Client-server Parallel (multiple processors and disks) Distributed
(web browser)
Old
Modern