Docsity

Database Management Systems: Concepts, Applications, and Benefits, Lecture notes of Database Management Systems (DBMS)

Partial preview of the text

Download Database Management Systems: Concepts, Applications, and Benefits and more Lecture notes Database Management Systems (DBMS) in PDF only on Docsity!

Database Management

System

Books Basic Texts Silberschatz,,Abraham , Henry F. Korth, S. Sudarshan Database system concepts : McGraw Hill 6th Edition, New Delhi References Post,Gerald V.: Database Management Systems , McGraw Hill International Edition, New Delhi Ramezelmasri, B. Navate, Fu ndamentals of Database System s, Pearson Education Asia

Database-System Applications

 (^) Enterprise InformationSales : For customer, product, and purchase information.  Accounting : For payments, receipts, account balances, assets and other accounting information.  Human resources : For information about employees, salaries, payroll taxes, and benefits, and for generation of paychecks.  Manufacturing : For management of the supply chain and for tracking production of items in factories, inventories of items in warehouses and stores, and orders for items.  Online retailers : For sales data noted above plus online order tracking, generation of recommendation lists, and maintenance of online product evaluations.  (^) Banking and Finance  (^) Banking : For customer information, accounts, loans, and banking transactions.  Credit card transactions : For purchases on credit cards and generation of monthly statements.  Finance : For storing information about holdings, sales, and purchases of financial instruments such as stocks and bonds; also for storing real-time market data to enable online trading by customers and automated trading by the firm.

Database-System Applications Contd…

 (^) Universities : For student information, course registrations, and grades (in addition to standard enterprise information such as human resources and accounting).  (^) Airlines : For reservations and schedule information. Airlines were among the first to use databases in a geographically distributed manner.  (^) Telecommunication : For keeping records of calls made, generating monthly bills, maintaining balances on prepaid calling cards, and storing information about the communication networks.

Purpose of Database Systems (cont..)

  • (^) Drawbacks of using file systems (cont.)
    • Atomicity of updates
      • (^) Failures may leave database in an inconsistent state with partial updates carried out
      • (^) E.g. transfer of funds from one account to another should either complete or not happen at all
    • (^) Concurrent access by multiple users
      • (^) Concurrent accessed needed for performance
      • (^) Uncontrolled concurrent accesses can lead to inconsistencies
        • (^) E.g. two people reading a balance and updating it at the same time
    • (^) Security problems
      • (^) For example, in a university, payroll personnel need to see only that part of the database that has financial information. They do not need access to information about academic records.
  • (^) Database systems offer solutions to all the above problems

View of Data

  • (^) A database system is a collection of interrelated data and a set of programs that allow users to access and modify these data.
  • (^) A major purpose of a database system is to provide users with an abstract view of the data.
  • (^) That is, the system hides certain details of how the data are stored and maintained.

Data Abstraction Contd..

2. Logical level.

  • (^) The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data.
  • (^) The logical level thus describes the entire database in terms of a small number of relatively simple structures.
  • (^) Although implementation of the simple structures at the logical level may involve complex physical-level structures, the user of the logical level does not need to be aware of this complexity.
  • (^) This is referred to as physical data independence.
  • (^) Database administrators, who must decide what information to keep in the database, use the logical level of abstraction.

Data Abstraction Contd..

3. View level.

  • (^) The highest level of abstraction describes only part of the entire database.
  • (^) Even though the logical level uses simpler structures, complexity remains because of the variety of information stored in a large database.
  • (^) Many users of the database system do not need all this information; instead, they need to access only a part of the database.
  • (^) The view level of abstraction exists to simplify their interaction with the system. The system may provide many views for the same database.

Instances and Schemas

  • (^) Databases change over time as information is inserted and deleted. The collection of information stored in the database at a particular moment is called an instance of the database.
  • (^) The overall design of the database is called the database schema. Schemas are changed infrequently, if at all.
  • (^) For example, A database schema corresponds to the variable declarations (along with associated type definitions) in a program. Each variable has a particular value at a given instant. The values of the variables in a program at a point in time correspond to an instance of a database schema.
  • (^) The physical schema describes the database design at the physical level, while the logical schema describes the database design at the logical level. A database may also have several schemas at the view level, sometimes called subschemas , that describe different views of the database.

Database Languages

  • (^) A database system provides a data-definition language to specify the database schema and a data-manipulation language to express database queries and updates.
  • In practice, the data-definition and data-manipulation languages are not two separate languages; instead they simply form parts of a single database language, such as the widely used SQL language. 1. Data-Manipulation Language A data-manipulation language (DML) is a language that enables users to access or manipulate data as organized by the appropriate data model. The types of access are:  (^) Retrieval of information stored in the database  (^) Insertion of new information into the database  (^) Deletion of information from the database  (^) Modification of information stored in the database

Database Languages Contd..

2. Data-Definition Language

  • (^) We specify a database schema by a set of definitions expressed by a special language called a data-definition language ( DDL ).
  • (^) The DDL is also used to specify additional properties of the data.
  • (^) We specify the storage structure and access methods used by the database system by a set of statements in a special type of DDL called a data storage and definition language.
  • (^) These statements define the implementation details of the database schemas, which are usually hidden from the users.

Database Administrators and Users People who work with a database can be categorized as database users or database administrators.

1. Database Users

  • (^) There are four different types of database-system users, differentiated by the way they expect to interact with the system.
  • (^) Different types of user interfaces have been designed for the different types of users. a. Native Users - T hese are the users who use the existing application to interact with the database. - (^) For example, online library system, ticket booking systems, ATMs etc., which has existing application and users use them to interact with the database to fulfill their requests.

Database Administrators and Users Contd..

2. Database Administrators:

  • (^) Once all the design is complete, it needs to be installed.
  • (^) Once this step is complete, users start using the database.
  • (^) The database grows as the data grows in the database.
  • (^) When the database becomes huge, its performance comes down.
  • (^) Also accessing the data from the database becomes challenge.
  • (^) There will be unused memory in database, making the memory inevitably huge.
  • (^) These administration and maintenance of database is taken care by database Administrator (DBA)
  • (^) DBA has many responsibilities.
  • (^) A good performing database is in the hands of DBA.

Database Administrators and Users Contd.. Responsibilities of Database Administrators: a. Installing and upgrading the DBMS Servers: b. Design and implementation: - Designing the database and implementing is also DBA’s responsibility. He should be able to decide proper memory management, file organizations, error handling, etc for the database. c. Performance tuning: - Since, database is huge and it will have lots of tables, data, constraints and indices, there will be variations in the performance from time to time. Also, because of some designing issues or data growth, the database will not work as expected. It is responsibility of the DBA to tune the database performance. He is responsible to make sure all the queries and programs works in fraction of seconds.