THE DATABASE APPROACH


THE DATABASE APPROACH





A database is a collection of logically related data.





It provides a centralized collection of data.





A database has a self-describing in nature.





It contains not only the data but also the complete definition of the database structure and constraints, which are stored in a system catalog.





A DBMS manages this data. It allows data sharing and integration of data of an organization in a single database.





Some commercially available DBMS are INGRES, ORACLE, DB2, Sybase etc.





=====================================================================





DATABASE MANAGEMENT SYSTEM (DBMS)









A database management system, is a combination of hardware and software that can be used to set up and monitor a database, and can manage the updating and retrieval of database which has been stored in it.





Most database management systems support the following facilities/capabilities:





  • Creation, modification and deletion of data file/s;
  • Addition, modification, deletion of data;
  • Retrieving of data collectively or selectively.
  • Sorting or indexing of data.
  • Creation of input forms and output reports. There may be either standardized forms/reports or that may be specifically generated according to specific user definition.
  • Manipulation of stored data with some mathematical functions, support for concurrent transactions
  • To maintain data integrity and security.
  • To create an environment for Data warehousing and Data mining.
  • The DBMS interprets and processes user’s requests to retrieve information from a database.
  • DBMS serves as an interface to various types of interactions.
  • In most cases, a query request will have to move several layers of software in the DBMS and operating system before the physical database can be accessed.
  • DBMS is an intermediary between the users and the database. (Provide data according user needs)




Purpose of Database Systems





  1. File-processing system'' supported by a conventional operating system.
    • Application programs are written to manipulate files to perform the following tasks:
      • Update, Add, Find, Generate statements.
  2. Development of the system proceeds as follows:
    • New application programs must be written as the need arises.
    • New permanent files are created as required.
    • Files may be in different formats, and
    • Application programs may be in different languages.
  3. Problems with the file-processing approach:
    • Data redundancy and inconsistency
      • Same information may be duplicated in several places.
      • All copies may not be updated properly.
    • Difficulty in accessing data
      • May have to write a new application program to satisfy an unusual request.
      • E.g. find all customers with the same postal code.
      • Could generate this data manually, but a long job...
    • Data isolation
      • Data in different files.
      • Data in different formats.
      • Difficult to write new application programs.
    • Multiple users
      • Want concurrency for faster response time.
      • Need protection for concurrent updates.
      • E.g. two customers withdrawing funds from the same account at the same time - account has $500 in it, and they withdraw $100 and $50. The result could be $350, $400 or $450 if no protection.
    • Security problems
      • Every user of the system should be able to access only the data they are permitted.
      • E.g. payroll people only handle employee records, and cannot see customer accounts; tellers only access account data and cannot see payroll data.
      • Difficult to enforce this with application programs.
    • Integrity problems
      • Data may be required to satisfy constraints.
      • E.g. no account balance below $25.00.




These problems and others led to the development of database management systems.





Advantages of DBMS





DBMS provides various advantages which are:-





  1. Reduction of Redundancies




In a file processing system, each user group maintains its own files resulting in a considerable amount of redundancy of the stored data. This results in wastage of storage space it may result in data inconsistencies.





In database approach data can be stored at a single place or with controlled redundancy under DBMS, which saves space and does not permit inconsistency.





  • Shared Data




A DBMS allows the sharing of database under its control by any number of application programs or users ( all authorized users)





  • Data Independence




In the file-based system, the descriptions of data and logic for accessing the data are built into each application program making the program more dependent on data. A change in the structure of data may require alterations to programs.





Database Management systems separates data descriptions from data, so it is not affected by changes. This is called Data Independence.





DBMS provides an abstract view and hides details.





Data independence is usually considered from two points of view: physical data independence and logical data independence. Physical data independence allows changes in the physical storage devices or organization of the files to be made without requiring changes. The files may migrate from one type of physical media to another or the file structure may change without any need for changes in the application programs.





Logical data independence implies that application programs need not be changed if fields are added to an existing record; nor do they have to be changed if fields not used by application programs are deleted.





Logical data independence indicates that the conceptual schema can be changed without affecting the existing external schemas.





Data independence is advantageous in the database environment since it allows for changes at one level of the database without affecting other levels. These changes are absorbed by the mappings between the levels.





The concept of data independence is similar to the concept of abstract data type in modern programming languages like C++.





Both hide implementation details from the users.





This allows users to concentrate on the general structure rather than low-level implementation details.





  • Improved Integrity




Data Integrity refers to validity and consistency of data. Data Integrity means that the data should be accurate and consistent. This is done by providing some checks or constraints. These are consistency rules that the database is not permitted to violate.





Constraints may apply to data items within a record or relationships between records. For example, the age of an employee can be between 18 and 70 years only. While entering the data for the age of an employee, the database should check this.





  • Efficient Data Access




DBMS utilizes techniques to store and retrieve the data efficiently at least for unexpected queries.





  • Multiple User Interfaces




many users having varying levels of technical knowledge use a database, a DBMS should be able to provide a variety of interfaces. This includes ─





a. query language for casual users,





b. programming language interfaces for application programmers,





c. forms and codes for parametric users,





d. menu driven interfaces, and





e. natural language interfaces for standalone users, these interfaces are still not available in standard form with commercial database.





7. Representing complex relationship among data





A database may include varieties of data interrelated to each other in many ways. A DBMS must have the capability to represent a variety of relationships among the data as well as to retrieve and update related data easily and efficiently.





  • Improved Security




Data is vital(dynamic) to any organization and also confidential. In a shared system where multiple users share the data, all information should not be shared by all users. For example, the salary of the employees should not be visible to anyone other than the department dealing in this. Hence, database should be protected from unauthorized users. This is done by Database Administrator (DBA) by providing the usernames and passwords only to authorized users as well as granting privileges (rights) or the type of operation allowed. This is done by using security and authorization subsystem. Only authorized users may use the database and their access types can be restricted to only retrieval, insert, update or delete or any of these. For example, the Branch Manager of any company may have access to all data whereas the Sales Assistant may not have access to salary details.





  • Improved Backup and Recovery




A file-based system may fail to provide measures to protect data from system failures. This is done by taking backups periodically. DBMS provides facilities for recovering the hardware and software failures. A backup and recovery subsystem is responsible for this. In case a program fails, it restores the database to a state in which it was before the execution of the program.





  1. Support for concurrent transactions




A transaction is defined as the unit of work. For example, a bank may be involved in a transaction where an amount of Rs.5000/- is transferred from account X to account Y. A DBMS also allows multiple transactions to occur simultaneously.





  1. Reduced application development time:




DBMS supports many important functions that are common to many applications accessing data stored in the DBMS. Such applications are more robust (stronger) than applications developed from scratch because many important tasks are handled by the DBMS in its place of being implemented by the application.





  1. Conflict Resolution




Database is under the control of the DBA, she or he should resolve the conflicting requirements of various users and applications. The DBA chooses the best file structure and access method to get optimal Performance for the response-critical applications, while permitting less critical applications to continue to use the database.





Disadvantages of DBMS





For small and simple applications for single users a database system is often not advisable.





Complexity: A database system creates additional complexity and requirements. The supply and operation of a database management system with several users and databases is quite costly and demanding.





Qualified Personnel: The professional operation of a database system requires appropriately trained staff. Without a qualified database administrator nothing will work for long.





Costs: Through the use of a database system new costs are generated for the system itself but also for additional hardware and the more complex handling of the system.





Lower Efficiency: A database system is a multi-use software which is often less efficient than specialized





Backup and recovery operations are fairly complex in a DBMS environment, and this is make worse in a concurrent multi-user database system. A database system requires a certain amount of controlled redundancies and duplication to enable access to related data items.





Centralization:- Means that the data is accessible from a single source namely the database. This increases the potential severity (strictness of rigidity) of security breaches and disruption of the operation of the organization because of downtimes and failures.





The replacement of a monolithic centralized database by a federation of independent and cooperating distributed databases resolves some of the problems resulting from failures and downtimes.


Post a Comment

0 Comments