×
Start where you are. Use what you have. Do what you can.
--Your friends at LectureNotes
Close

DATABASE MANAGEMENT SYSTEM

  • Database Management System - DBMS
  • Other
  • 613 Views
  • 8 Offline Downloads
  • Uploaded 11 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Surya InfoEdge Prof: Sadaf Suryawanshi Dawn of your life UNIT 1 Chapter 1: Introduction to Databases and Transactions 1. What is database System? List and explain different applications of Database Systems. Definition: • A database system is a collection of Inter-related data and a set of programs to access and modify data. • The objective of DBMS is to provide convenient and efficient way of defining, storing and retrieving data from database. Examples: 1. Microsoft Access 2. Foxpro 3. FileMaker 4. MySQL 5. ORACLE 6. Microsoft SQL Server etc. Applications of Database System: • Databases are widely used; some of the database system applications are given below. • Banking: Customer Information, Accounts, loans, Transactions. • Airlines: Reservations, Schedules. • Universities: Student Information, Registration, grades. • Sales: Customer Information, Product, Purchases. • Telecommunication: Call records, Monthly bills, Balances on prepaid calling cards. • Manufacturing: production, inventory, Orders, Supply Chain • Human Resources: Employee Records, Salaries, Tax deductions. 2. List and Explain Disadvantages of File Processing System. (Purpose of Database System) • • • Before the advent of DBMS, file-processing system was used to store information. The Data is stored in permanent files and different application program are written to Add and Extract data from these files. There are various disadvantages of file-processing system 1. Data Redundancy and Inconsistency Since the data files and application programs are written by different programmers over a long period. i. The data files are likely to have different formats. ii. Programs may be written in several programming languages. iii. The same information may be duplicated in several files. This results in data redundancy and Inconsistency. Example: Library Account file stores information about Student_id, Name, Branch, Library_id etc. Suggest your friends to Join Surya InfoEdge. Python+DSA+Maths@10000 Practical oriented teaching and easy notes prepare for best results. SYBSCIT @ 18000 Page No: 1

Text from page-2

Prof: Sadaf Suryawanshi Surya InfoEdge Dawn of your life Similarly, Accounts for fees stores Student_id, Name, Branch, Fees_paid etc. Field (Name, Branch) repeats in both files. This duplication can result in data redundancy. Data Redundancy increases cost of storing and retrieving data. If values of these common fields are not matching for records, then it results in inconsistency of data. 2. Difficulty in Accessing Data Data access and retrieval is difficult in conventional file processing system. Example: Let‟s Consider, Bank manager needs to find all customers who have balance greater than RS.10, 000 . The bank manager has two choices either get list of all customers and extract needed information or ask system programmer to write necessary application program. Both alternatives are unsatisfactory, even if application program is written some days later requirement may change. 3. Data Isolation To retrieve appropriate data, writing new application program is difficult because data are scattered in various files and may be in different format. 4. Integrity Problem The data values stored in database must satisfy certain types of consistency constraints. For example: Balance of bank Account should never fall below prescribed Amount say RS.500 Developer enforce these consistency constraints in application programs. However, if new constraints to be added it is difficult to change existing application program. 5. Atomicity Problem In many applications it is crucial to ensure that after failure the data should be restored to consistent state. For Example: Consider a program to transfer RS. 500 from Account A to Account B. read(A) A:=A-500 write(A) read(B) B:=B-500 write(B) If failure occurs after removing RS. 500 from Account A and before adding it to account B. This results in inconsistent state. The fund transfer must be atomic – it must happen entirely or not at all. 6. Concurrent – access anomalies In case of a file processing system, data is not centralized. If two or more users want to access the database at same time. Concurrent update may result in inconsistent data. For example: Consider a program to transfer RS. 500 from Account A to Account B and Rs. 1000 from A to C working simultaneously then the outcome depends on the order in which access takes place. Suggest your friends to Join Surya InfoEdge. Python+DSA+Maths@10000 Practical oriented teaching and easy notes prepare for best results. SYBSCIT @ 18000 Page No: 2

Text from page-3

Surya InfoEdge Prof: Sadaf Suryawanshi Dawn of your life Account A {Account Balance=2000} Account B {Account Balance=0} read(A) A:=A-500 write(A) read(B) B:=B+500 write(B) Account C {Account Balance=100} read(A) A:=A-1000 write(A) read(C) C:=C+1000 write(C) 7. Security problems In file processing system programs are added to the system in adhoc manner hence it is very difficult to enforce security constraints. For example: In Banking System, Bank employee can see only specific information of account holder but Bank manager has access to all the information. It is difficult in fileprocessing system to enforce this security constraint. 3. What is Data Abstraction? List and Explain levels of abstraction. Definition: • Many database system users are not computer trained; hence developers hide the complexity of database from users through several levels of abstraction. • This simplifies user interaction with database. Figure: Three Levels of Data Abstraction Suggest your friends to Join Surya InfoEdge. Python+DSA+Maths@10000 Practical oriented teaching and easy notes prepare for best results. SYBSCIT @ 18000 Page No: 3

Text from page-4

Prof: Sadaf Suryawanshi • Surya InfoEdge Dawn of your life Following are levels of Abstraction 1. Physical level • It is the lowest level of abstraction. • It describes how the data is actually stored and describes access method to be used by the database. • At this level complex low level data structures are described in detail. • The physical level is described by the physical schema. • Physical level is used by Designers. 2. Conceptual (Logical) level • It is the next higher level of abstraction. • It describes what are actually stored in database and relationship among data. • At this level entire database is described in terms of simple structure. • The logical level is described by logical schema. • Conceptual level of abstraction is used by Database Administrator. 3. View Level • It is the highest level of abstraction. • It describes only the part of database. • System may provide many views of the database; since many users of database system will not be concerned with all the information; but only part of the entire database. • The view level is described by sub-schemas. • View level is used by end users. Example: • Let‟s say we are storing customer information in a customer table. • At physical level these records can be described as blocks of storage (bytes, gigabytes, terabytes etc.) in memory. These details are often hidden. • At the logical level these records can be described as Relation with attributes along with their data types and tuples, their relationship with other tables can be logically implemented. The Database Administration work at this level. • At view level, user just interact with system with the help of GUI and enter the details at the screen, they are not aware of how the data is stored and what data is stored; such details are hidden from them. 4. What is Data Independence? List and explain levels of data independence. Definition: The ability to modify schema definition in one level without affecting schema definition in next higher level is called data independence. There are two levels of data independence. 1. Physical Data Independence 2. Logical Data Independence Suggest your friends to Join Surya InfoEdge. Python+DSA+Maths@10000 Practical oriented teaching and easy notes prepare for best results. SYBSCIT @ 18000 Page No: 4

Lecture Notes