Q.1 How is DBMS classified based on several criteria?

Explain each one of them with few examples where ever required Ans : Several criteria are normally used to classify DBMSs. These are discussed below : Based on Data Models The various data models have already been discussed. Depending on the data model they use, the DBMSs can be classified as hierarchical, network, relational, object-oriented, and object-relational. Among these, the hierarchical and network data models are the older data models and now known as legacy data models. Some of the old applications still run on the database systems based on these models. Most of the popular and current commercial DBMSs are based on relational data model. The object-based data models have been implemented in some DBMSs; however, have not become popular. Due to the popularity of relational databases, the object-oriented concepts have been introduced in these databases that led to the development of a new class of DBMSs called object-relational DBMSs. Based on Number of Users Depending on the number of users the DBMS supports, it is divided into two categories, namely, single-user system and multi-user system. Insingle-user system the database resides on one computer and is only accessed by one user at a time. The user may design, maintain, and write programs for accessing and manipulating the database according to the requirements, as well as perform all the user roles. The user may also hire database system designers to design a system. In such a case, the single user performs the role of end user only. However, in most enterprises the large amount of data is to be managed and accessed by multiple users and thus, requires multi-user systems. In multi-user system, multiple users can access the database simultaneously. In multi-user DBMS, the data is both integrated and shared. For example, theOnline Book database is a multi-user database system in which the data of books, authors, and publishers are stored centrally and can be accessed by many users. Based on Number of SitesDepending on the number of sites over which the database is distributed, it is divided into two types, namely, centralized and distributed database systems. Centralized database systems run on a single computer system. Both the database and DBMS software reside at a single computer site. The user interacts with the centralized system through a dummy terminal connected to it for information retrieval. Indistributed database systems, the database and DBMS are distributed over several computers located at different sites. The computers communicate with each other through various communication media such as high-speed networks or telephone lines. Distributed databases can be classified as homogeneous and heterogeneous. In homogeneous distributed database system, all sites have identical database management system software, whereas in heterogeneous distributed database system, different sites use different database management system software. Based on the PurposeDepending on the purpose the DBMS serves, it can be classified as general purpose or specific purpose. DBMS is a general purpose software system. It can; however, be designed for specific purposes such as airline or railway reservation. Such systems cannot be used for other applications without major changes. These database systems fall under the category of online transaction processing (OLTP) systems. Online transaction processing system is specifically used for data entry and retrieval. It supports large number of concurrent transactions without excessive delays. An automatic teller machine (ATM) for a bank is an example of online commercial transaction processing application. The OLTP technology is used in various industries, such as banking, airlines, supermarkets, manufacturing, etc. Q.2 Differentiate between B+ tree and B- tree. Explain them with diagrams Definition: A B+tree is a balanced tree in which every path from the root of the tree to a leaf is of the same length, and each nonleaf node of the tree has between [n/2] and [n] children, where n is fixed for a particular tree. It contains index pages and data pages. The capacity of a leaf has to be 50% or more. For example: if n = 4, then the key for each node is between 2 to 4. The index page will be 4 + 1 = 5. B+-tree Structure A B+-tree is a generalization of a binary search tree (BST). The main difference is that nodes of a B+tree will point to many children nodes rather than being limited to only two. Since the goal is to minimize disk accesses whenever we are trying to locate records, we want to make the height of the multiway search tree as small as possible. This goal is achieved by having the tree branch in large amounts at each node. A B+-tree of order m is a tree where each internal node contains up to m branches (children nodes) and thus store up to m1 search key values -- in a BST, only one key value is needed since there are just two children nodes that an internal node can have. m is also known as the branching factor or the fanout of the tree. 1. The B+-tree stores records (or pointers to actual records) only at the leaf nodes, which are all found at the same level in the tree, so the tree is always height balanced. All internal nodes, except the root, have between Ceiling(m /2) and C children The root is either a leaf or has at least two children. Internal nodes store search key values, and are used only as placeholders to guide the search. The number of search key values in each internal node is one less than the number of its non-empty children, and these keys partition the keys in the children in the fashion of a search tree. The keys are stored in non-decreasing order (i.e. sorted in lexicographical order).

2. 3. 4.

5. Typically this is based on the size of a disk block. Thus B-Trees typically have greater depth than corresponding B+-Tree Insertion and deletion more complicated than in B+-Trees Implementation is harder than B+-Trees. The leaf pages must store enough records to remain at least half full. so fan-out is reduced. Search keys in nonleaf nodes appear nowhere else in the B-tree. The leaf nodes of a B+-tree are linked together to form a linked list. B+ TREE INSERTION AND DELETION Adding Records to a B+ Tree Q. Sometimes possible to find search-key value before reaching leaf node. Example of a B+ tree with four keys (n = 4) looks like this: B . eliminates redundant storage of search keys.Tree Index Files Definition Similar to B+-tree. 6. but B-tree allows search-key values to appear only once. etcetera. a leaf node in a B+-tree of order m may store more or less than m records. This is done so that the records can be retrieved sequentially without accessing the B+-tree index. Disadvantages of B-Tree indices: Only small fraction of all search-key values are found early Non-leaf nodes are larger. 1 2 2 . the size of a record pointer. This also supports fast processing of range-search queries. Advantages of B-Tree indices: May use less tree nodes than a corresponding B+-Tree. no.3 Employee Emp Id MUL 1 MUL 2 SMU 1 Name Ramya Nupur Rajesh Project PR 1 PR 1 PR 3 Salary 40000 45000 20000 Dep. Nonleaf node – pointers Bi are the bucket or file record pointers. Depending on the size of a record as compared to the size of a key. an additional pointer field for each search key in a nonleaf node must be included.

averages. the enforcement regime simply aborts the processto restart later. If we want to see all the employees with salary between 40000 and 50000.Any intermediate changes made to the database are restoredto their original values. which involves may database operations. b)In case the transaction has failed to achieve it’s desired objective. and displays the results in a datasheet.Any database operation can not be immune to the system on which it operates(both the hardware and the software. A transaction is a unit of program executions that accesses and possibly updates various databases.In all such cases. iii)Some programs provide for the user to interrupt during execution.If theuser changes his mind during execution. counts. thetransactions are terminated. You can also use a select query to group data.SMU 2 Vinay PR 2 50000 3 Dept id 1 2 3 4 SMU 3 Department : Anil D name MIS HRM Finance Research PR 2 80000 Place Bangalore Bangalore Chennai Bangalore 2 Using these tables answer the following question a. Student database performs transactions. Show the deduction of the tables in your database to the different types of normal forms Ans : . Q. thesystem should ensure that no change. (but before the transactions arecomplete) he may opt out of the operation. iv)Local exceptions: Certain conditions during operation may force thesystem to raise what are known as “exceptions”.In all such cases of failure. Example: Banking system.The other reasons can be physical problems like theft. we say the system should be able to “Recover” from the failure. and other types of totals.5 Consider any database of your choice (may be simple banking database/forecasting database/project management database). or other queries there.The systemshould ensure that any transaction submitted to it is terminated in one of the following ways. query languages can be classified Q. v)Concurrency control enforcement: In certain cases when concurrencyconstrains are violated. and to calculate sums.Failures can occur in a variety of ways. ii)A transaction or system error: The transaction submitted may be faulty –like creating a situation of division by zero or creating a negative numberswhich cannot be handled (For example. Explain aggregate functions and grouping in detail Ans : A select query retrieves data from one or more of the tables in your database. in a reservation system. including the operating systems). Select employee name from EMPLOYEE table. the changesare recorded permanently back to the database and the database isindicated that the operations are complete. is reflected onto thedatabase. a)All the operations listed in the transaction are completed. Broadly. software or network error can make the completion of the transaction an impossibility. Query languages are computer languages used to make queries into databases and information systems. whatsoever. whose name starts with R c. negativenumber of seats convey no meaning). the system simplydiscontinuous the transaction by reporting an error. fire etc or system problemslike disk failure. Ans : A transaction is a logical unit of work. before calling off the transaction andintimating the same to the database.In such cases. i)A System Crash: A hardware. viruses etc.For example. a bankaccount holder may not have sufficient balance for some transaction to bedone or special instructions might have been given in a bank transactionthat prevents further continuation of the process. which query can be used? b.4 What are the problems and failures that may encounter with respect to the transactions in a database management system? Give examples. A transaction is a collection of operations that forms a single logical unit of work. In the second case. a recovery mechanism isto be in place.

This banking system project will serve as a useful approach to data base dialogue box to deposit and withdraw the money for the person. It has an extensive network of more than 200 branches. Now there were no problems with regard to imbalances in the load across various network servers. Moreover the new system also brought in many applications that helped local managers in the decision making process. It serves as a helpful approach for the users. AKPY divided the entire IT infrastructure of the bank around two verticals. user friendly. Centralised database management system complemented the security system by bringing in authentication through a unified ID management server. Because of the following reasons. reliable. Conclusion: The Banking System a Database Project system is more efficient. Staff and managers could access the information through their PCs and laptops. So this must be the first choice for me to select this topic. The bank faced a challenge in integrating multi-pronged database management system into a centralized system. Net Banking. Demat facility. And such banks get success to create their own image in public and corporate world. It offers banking services to retail as well as corporate clients.e. It reduces the time taken by the user to save the money.Usually all persons want money for personal and commercial purp oses. Mobile Banking. Door to Door facility. Account facility etc. These banks always accept innovative notions in Indian banking scenario like Credit Cards. Thus the project is the user friendly approach. Banks are the oldest lending institutions in Indian scenario. data entry and retrieval. Moreover. The bank managers could also process the loan applications in reduced time since the customer’s previous records could be accessed at the click of the button and approval from the higher authorities could be obtained in real time. Loans and Advances. For that they give each and every minute detail about their institution and projects to public. To survive in this modern arket every bank implements so many new innovative ideas. It provides easy way of the deposit and withdraws the money. the bank’s top management decided to fix the problem and operationalise a robust database management system. top management could keep an eye on the functioning of various branches. technology of procedure new schemes and new ventures. All the individual database servers from the individual branches were removed. There were only two such centralised data centers (one for retail banking and another for corporate banking) that were managed centrally. So. . strategies. The total cost of operating and maintaining the current IT infrastructure was very high and the fundamental shortcomings added to the costs. I prefer this project work to get the knowledge of the banking system. Q. They are providing ample facilities to satisfy their customers i. Therefore. Each branch had its database management system stored in a traditional way on the disk. The entire database system was made virtual such that the managers and the staff can access only the required information (related to retail banking or corporate banking) from the respective centralised data centers. Investment facility. The Banking System a Database Project system provides faster data access. there were also recurrent problems due to the malfunctioning of the currently operational database management system. They are providing all facilities to all citizens for their own purposes by their terms. Hence the cases of fraud and cheating reduced considerably. The bank hired an external database technology consulting firm called AKPY Info systems Limited. Risk Management etc. At this stage every person must know about new innovation. fast. as a student business economics I take keen interest in Indian economy and for that banks are the main source of development. There were significant savings in the cost and also in the consumption of power. The IT department of the bank also realized that the computing capabilities of its PCs and servers were not proportionately distributed among all its branches. Over and above the proposed system does not have any possibility of data loss during processing. Managers and officers of the bank were able to process half a million transactions per month in real time after the new implementation. and advanced technologies.6 Read the following case study thoroughly and answer the following questions: Laxmi bank is one of the largest private sector banks of India. Credit Card facility. The retail banking vertical and the corporate banking vertical. Instant facility. Due to centralised data management. ATM machines.

List the uses of centralized data management b. uses of centralized data management : From the above case study it is concluded that centralized data management has following advantages which has made it more useful than the older system : 1. local autonomy. It may be stored in multiple computers located in the same physical location. The duplication process is normally done at a set time after hours. Duplication on the other hand is not as complicated. in a database) can be distributed across multiple physical locations. or on other company networks. on corporate intranets or extranets. Collections of data (e. as the volume of data increases. A distributed database does not share main memory or disks. For example. and hence the price the business is willing to spend on ensuring data security. Both of the processes can keep the data current in all distributive locations. or may be dispersed over a network of interconnected computers. It basically identifies one database as a master and then duplicates that database. Global applications: Applications which do require data from other sites. synchronous and asynchronous distributed database technologies. Once the changes have been identified. This process can also require a lot of time and computer resources. Replication involves using specialized software that looks for changes in the distributive database. Basic architecture A database User accesses the distributed database through: Local applications. If data is gathered at one location and centrally managed. This is to ensure that each distributed location has the same data. Centralised database management system complements the security system by bringing in authentication through a unified ID management server 2 If data is stored and managed in various locations. The replication process can be very complex and time consuming depending on the size and number of the distributive databases. What steps Laxmi bank need to take if it were to change its centralised database system to a distributed database system in future? Ans : a. . as well as necessary devices to manage all the data must be increased accordingly.g. A distributed database can reside on network servers on the Internet. Applications which do not require data from other sites. changes to the master database only are allowed.a. time and effort. there are two processes: replication and duplication. the replication process makes all the databases look the same. In the duplication process. A distributed database is a database that is under the control of a central database management system (DBMS) in which storage devices are not all attached to a common CPU. The replication and distribution of databases improves database performance at enduser worksites. Besides distributed database replication and fragmentation. This is to ensure that local data will not be overwritten. These technologies' implementation can and does depend on the needs of the business and the sensitivity/confidentiality of the data to be stored in the database. To ensure that the distributive databases are up to date and current. there are many other distributed database design technologies. consistency and integrity.

in the distributed banking system. and appropriate action may be needed to recover from the failure. in an airline may result in the loss of potential ticket buyers to competitors. it is possible for a user in one branch to access data in another branch. be a single centralized database. for example. Thus. there is a global database administrator responsible for the entire system. In centralized database as all the data reside on one place so problem of bottleneck can occur. then a user at one site may be able to access data that is available at another site. In particular. each local administrator may have a different degree of autonomy which is often a major advantage of distributed databases. In a distributed system. mechanisms must be available to integrate it smoothly back into the system. in effect. In a centralized system. Reliability and Availability: If one site fails in distributed system. For example. Without this capability. Advantages of Data Distribution The primary advantage of distributed database systems is the ability to share and access data in a reliable and efficient manner. transaction needing a particular data item may find it in several sites. the failure of a site does not necessarily imply the shutdown of the system. Let me define some advantages of distributed database. As it is totally different from distributed database which has data on different places. the remaining sited may be able to continue operating. the ability of most of the systems to continue to operate despite failure of one site. Finally. a user wishing to transfer funds from one branch to another would have to resort to some external mechanism for such a transfer. The primary advantage to accomplishing data sharing by means of data distribution is that each site is able to retain a degree of control over data stored locally. when the failed site recovers or is repaired. and data availability is not efficient as in distributed database. it will clear the difference between centralized and distributed database. Although recovery from failure is more complex in distributed systems than in a centralized system. . The system must no longer use the service of the failed site.A centralized database has all its data on one place. A part of these responsibilities is delegated to the local database administrator for each site. Data sharing and Distributed Control: If a number of different sites are connected to each other. the database administrator of the central site controls the database. This external mechanism would. The failure of one site must be detected by the system. results in increased availability. Loss of access to data. Depending upon the design of the distributed database system. Availability is crucial for database systems used for real-time applications. if data are replicated in several sites.

Such parallel computation allows for faster processing of a user’s query. it may be possible to split the query into subqueries that can be executed in parallel by several sites. queries may be directed by the system to the least heavily loaded sites. In those cases in which data is replicated.Speedup Query Processing: If a query involves data at several sites. .