Você está na página 1de 4

DBMS NOTES Introduction to DBMS Data: Data is meaningful known raw facts that can be processed and stored

as inf ormation. Database: Database is a collection of interrelated and organized data. DBMS: Database Management System (DBMS) is a collection of interrelated data [us ually called database] and a set of programs to access, update and manage those data [which form part of management system]. OR It is a software package to facilitate creation and maintenance of computerized database. It is general purpose software that facilitates thefollowing:1. 1. to be 2. 3. 4. sly. Defining: Specifying data types and structures, and constraints for data stored. Constructing: Storing data in a storage medium. Manipulating: Involves querying, updating and generating reports. Sharing: Allowing multiple users and programs to access data simultaneou

Eg. Of DBMS: Access, dBase, FileMaker Pro, and FoxBASE, ORACLE, Ingress, Informi x, Sybase, etc. Primary goals of DBMS are: 1. To provide a way to store and retrieve database information that is both convenient and efficient. 2. To manage large and small bodies of information. It involves defining st ructures for storage of information and providingmechanism for manipulation of i nformation. 3. It should ensure safety of information stored, despite system crashes or attempts at unauthorized access. 4. If data are to be shared among several users, then system should avoid p ossible anomalous results. Eg. Of DBMS applications 1. Banking For customer information, accounts, and loans, and banking trans actions. [all transactions]. 2. Airlines For reservation and schedule information. [reservations, schedu les]. 3. Universities For student information, course registrations, and grades. [registration, grades]. 4. Credit Card Transactions For purchases on credit card and generation of m onthly statements. 5. Telecommunication For keeping records of calls made, generating monthly bills, maintaining balances on prepaid calling cards,and storing information abo ut communication networks. 6. Finance For storing information about holdings, sales, and purchases of financial instruments such as stocks and bonds. 7. Sales For customer, product, and purchase information. [customers, produ cts, purchases]. 8. Manufacturing For management of supply chain and for tracking production of items in factories, inventories of items inwarehouses/stores, and orders for items.[production, inventory, orders, supply chain] 9. Human Resources For information about employees, salaries, payroll taxes and benefits, and generation of paychecks.[employeerecords, salaries, tax deduc tions] File systems/File processing systems A file system is basically storing information in data structures called files in

the operating system and manipulating this information via application programs that manipulate the files. Disadvantages of File Processing System: 1. Data Redundancy Since different programmers create the files and applica tion programs over a long period, the various files are likelyto have different formats and the programs may be written in several programming languages. Moreov er, the same information may beduplicated in several files, this duplication of data over several files is known as data redundancy. Eg. The address and telephone number of a particular customer may appear in a fi le that consists of saving-account records and in a file thatconsists of checkin g-account records. 2. Data Inconsistency The various copies of same data may no longer agree i. e. various copies of the same data may contain differentinformation. Eg. A changed customer address may be reflected in savings-account records but n ot elsewhere in the system. 3. Difficulty in accessing data In a conventional file processing system it is difficult to access the data in a specific manner and it isrequire creating a n application program to carry out each new task. Eg. Suppose that one of the bank officers needs to find out the names of all cus tomers who live within a particular postal-code area. Theofficer asks the data-p rocessing department to generate such a list. Because the designers of the origi nal system did not anticipate thisrequest, there is no application program on ha nd to meet it. 4. Data Isolation Because data are scattered in various files, and files may be in different formats, writing new application programs toretrieve the approp riate data is difficult. 5. Integrity problems The data stored in the database must satisfy certain t ypes of consistency constraints. Eg. The balance of a bank account may never fall below a prescribed amount (say, $25).Developers enforce these constraints in the system by adding appropriate c ode in the various application programs. However, when newconstraints are added, it is difficult to change the programs to enforce them. The problem is compound ed when constraints involve severaldata items from different files. 6. Atomicity problems A computer system, like any other mechanical or electr ical device, is subject to failure. In many applications, it iscrucial that, if a failure occurs, the data be restored to the consistent state that existed prio r to the failure. Eg. Consider a program to transfer $50 from account A to account B. If a system failure occurs during the execution of the program, it is possible that the $50 was removed from account A but was not credited to account B, resulting in an in consistent database state. Clearly, it isessential to database consistency that both credit and debit occur, or that neither occurs. That is, the funds transfer must be atomic it musthappen in its entirely or not at all. It is difficult to ensure atomicity in a conventional file processing system. 7. Concurrent-access anomalies For the sake of overall performance of the s ystem and faster response, many systems allow multipleusers to update the data s imultaneously. In such an environment, interaction of concurrent updates may res ult in inconsistent data. Eg. Consider bank account A, containing $500. If two customers withdraw funds (s ay $50 and $100 respectively) from account A at aboutthe same time, the result o f the concurrent executions may leave the account in an incorrect (or inconsiste nt) state. Suppose that the programsexecuting on behalf of each withdrawal read the old balance, reduce that value by the amount being withdrawn, and write the result back. If the two programs run concurrently, they may both read the value $500, and write back $450 and $400, respectively. Depending on which onewrites t he value last, the account may contain either $450 or $400, rather than the corr ect value of $350. To guard against this possibility, the system must maintain some form of supervi

sion. But supervision is difficult to provide becausedata may be accessed by man y different application programs that have not been coordinated previously. 8. Security Problems Not every user of the database system should be able to access all the data. Eg. In a bank system, payroll personnel need to see only that part of the databa se that has information about the various bank employees.They do not need access to information about customer accounts. But, since application programs are add ed to the system in an ad hocmanner, enforcing such security constraints is diff icult. Difference between DBMS and File-processing systemDBMS File-processing Systems 1. Redundancies and inconsistencies in data are reduced due tosingle file format s and duplication of data is eliminated.1. Redundancies and inconsistencies in d ata exist due to single fileformats and duplication of data.2. Data is easily ac cessed due to standard query procedures. 2. Data cannot be easily accessed due t o special application programs needed to access data.3. Isolation/retrieval of r equired data is possible due to commonfile format, and there are provisions to e asily retrieve data.3. Data isolation is difficult due to different file formats , and also because new application programs have to be written.4. Integrity cons traints, whether new or old, can be created or modified as per need.4. Introduct ion of integrity constraints is tedious and again newapplication programs have t o be written.5. Atomicity of updates is possible. 5. Atomicity of updates may no t be maintained.6. Several users can access data at the same time i.e. concurren tlywithout problems.6. Concurrent accesses may cause problems such asinconsisten cies.7. Security features can be enabled in DBMS very easily. 7. It may be diffi cult to enforce security features. Advantages of a DBMS over file-processing system A DBMS has three main features:(1) Centralized data management,(2) Data independ ence and(3) Data integrationDue to its centralized nature, the database system c an overcome the disadvantages of the file-based system as discussed below. Minimal Data Redundancy Since the whole data resides in one central database, the various programs in th e application canaccess data in different data files. Hence data present in one file need not be duplicated in another. This reduces data redundancy.However, th is does not mean all redundancy can be eliminated. There could be business or te chnical reasons for having someamount of redundancy. Any such redundancy should be carefully controlled and the DBMS should be aware of it. Data Consistency Reduced data redundancy leads to better data consistency. Data Integration Since related data is stored in one single database, enforcing data integrity is much easier. Moreover, thefunctions in the DBMS can be used to enforce the inte grity rules with minimum programming in the application programs. Data Sharing Related data can be shared across programs since the data is stored in a central ized manner. Even new applicationscan be developed to operate against the same d ata. Enforcement of Standards Enforcing standards in the organization and structure of data files is required and also easy in aDatabase System, since it is one single set of programs which

is always interacting with the data files. Application Development Ease The application programmer need not build the functions for handling issues like concurrentaccess, security, data integrity, etc. The programmer only needs to i mplement the application business rules. This brings inapplication development e ase. Adding additional functional modules is also easier than in file-based syst ems. Better Controls Better controls can be achieved due to the centralized nature of the system.

Você também pode gostar