State the advantages of using database system over file-based information system.
The database approach offers a number of potential advantages compared to traditional file processing systems.
Program-Data Independence: The separation of data descriptions from the application programs that use the data is called Data independence. With the database approach, data descriptions are stored in a central location called the repository. This property of database systems allows an organization’s data to change without changing the application programs that process the data.
Data Redundancy and Inconsistency: In File-processing System, files having different formats and application programs may created by different programmers. Similarly different programs may be written in several programming languages. The same information placed at different files which cause redundancy and inconsistency consequently higher storage and access cost. For Example, the address and telephone number of a person may exist in two files containing saving account records and checking account records. Now a change in person’s address may reflect the saving account records but not anywhere in the whole system. This results the data inconsistency. One solution to avoid this data redundancy is keeping the multiple copies of same information, replace it by a system where the address and telephone number stored at just one place physically while it is accessible to all applications from this itself. DBMS can handle Data Redundancy and Inconsistency.
Difficulty in accessing Data: In Classical file organization the data is stored in the files. Whenever data has to be retrieved as per the requirements then a new application program has to be written. This is tedious process.
Data isolation: Since data is scattered in various files, and files may be in different formats, it is difficult to write new application programs to retrieve the appropriate data.
Concurrent access: There is no central control of data in classical file organization. So, the concurrent access of data by many users is difficult to implement.
Security Problems: Since there is no centralized control of data in classical file organization. So, security, enforcement is difficult in File-processing system.
Integrity Problem: The data values stored in the database must satisfy certain types of consistency constraints. For example, the balance of a bank account may never fall below a prescribed amount. These constraints are enforced in the system by adding appropriate code in the various application programs. However, when new constraints are added, it is difficult to change the programs to enforce them. The problem is compounded when constraints involve several data items from different files.
Improved Data Sharing: A database is designed as a shared corporate resource. Authorized internal and external users are granted permission to use the database, and each user is provided one or more user views to facilitate this use. A user view is a logical description of some portion of the database that is required by a user to perform some task.
Increased Productive of Application Development: A major advantage of the database approach is that it greatly reduces the cost and time of developing new business applications. There are two important reasons that data base applications can often be developed much more rapidly than conventional file applications.
What are the differences between Primary Index, Secondary Index, and Clustering Index?
For the input expression (4*7+1)*2, construct an annotated parse tree.