sap4help@gmail.com +91 8956877466
This website is always under updation with new contents
Unit - V Database Operations and Maintenance
Unit I
Unit II
Unit III
Unit IV
Unit V
List the essential requirement of database security.
Ans: Reasons for the database security:
• Failures of various forms during normal operation. For example transaction processing or storage media loss. Proper recovery procedures are normally used to recover from failures occurring during transaction processing. Lack of such procedures could lead to inconsistencies in the database.
• Concurrent usage anomalies. Proper synchronization mechanism is used to avoid data inconsistencies due to concurrent usage.
• System error. A dial in user may be assigned the identity of another dial –in user who was disconnected accidentally or who hung up without going through a log –off procedure.
• Improper authorization: The authorizer can accidentally give improper authorization to a user which could lead to database security and or integrity violations.
• Hardware failures: For example memory protection hardware that fails could lead to software errors and culminate in database security and or integrity violations.
• A computer system operator or system programmer can intentionally by pass the normal security and integrity mechanism alter or destroy the data in the database or make unauthorized copies of sensitive data.
• An authorized user can get access to a secure terminal or to the password of an authorized user and compromise the database. Such users could also destroy the database files.
who is database administrator? Explain its role?
Ans: database administrator (short form DBA) is a person responsible for the design, implementation, maintenance and repair of an organization's database. They are also known by the titles Database Coordinator or Database Programmer, and is closely related to the Database Analyst, Database Modeller, Programmer Analyst, and Systems Manager. The role includes the development and design of database strategies, monitoring and improving database performance and capacity, and planning for future expansion requirements. They may also plan, co-ordinate and implement security measures to safeguard the database. Employing organizations may require that a database administrator have a certification or degree for database systems (for example, the Microsoft Certified Database Administrator)
The functions of the database administrator can be listed as follows:
1. Develop a plan for the organization’s database/data resource.
2. Organize and staff the database administration (DBA) functions.
3. Supervise the dba functions.
4. Act as a bridge in communicating between managers, users and application developers.
5. Establish and supervise the following systems and procedures for maintaining and safeguarding the database:
• Usage and security monitoring
• Performance monitoring and load balancing
• DBMS trouble-shooting
Data dictionary operations
Explain resource locking in distributed database.
Ans: Resource locking in distributed database: The problem due to concurrent access can be avoided by locking the required records when it is accessed for the transaction with respect to the user from Department X and releasing it after the updated data is written back into the respective record of the database so that the accessing of the required data for the transaction with respect to the user from Department Y is denied till the first transaction is fully executed by x. The sequence of actions to be carried out to have meaningful updates in the database with respect to the above example is presented below:
• Identify the required record with respect to the transaction of the user from Department.
• Lock that record.
• Read the content of that record and bring it to the working area.
• Write the content of the record in the working area.
• Write back the updated versions of the record in the database.
• Unlock that record for the other users.
• Lock the above record and proceed with the transaction of the user from the Department Y.
• Read the content of that record and bring it to the working area.
• Update the content of the record in the working area.
• Write back the updated versions of the record in the database.
The above discussion explains the fact that the resources should be locked and unlocked in a particular sequence to have better concurrency control. The database locked at different levels. The extent to which the database is locked is known as locking granularity. While executing a transaction then it is known as coarse granularity. If the required data within a single record with respect to the transaction is locked, then it is known as fine granularity.
Describe object database System.
Ans: It is database model in which information is represented in the form of objects as used in object –oriented programming.
Objects databases generally recommended when there is a business need for high performance processing on complex data. When database capabilities are combined with object programming languages capabilities, the result is an object database management system (ODBMS) An ODBMS makes database appear as programming language objects in one or more object programming languages. An ODBMS extends the programming language with transparently persistent data, concurrency control, data recovery, associative queries and other capabilities.
Strength of ODBMSs:
1. Better support for complex Applications: ODBMSs have provided better support for certain applications requiring high performance and modeling of complex relationships and heavily inter-related data that have traditionally not been well served by other DBMSs.
2. Enhance programmability: It has stated that “Using a highly integrated, object-oriented database management system to build applications and store reusable code can save 20% to 30% of development cost beyond that achieved solely by object oriented programming”. The seamless integration of an application programming language and database DDL/DML enables further savings in code.
3. Reduce problems of referential Integrity: One of the major problems with relational databases has been that of the dangling references. This problem has been solved in object databases by giving the responsibility of pointer maintenance to the database itself rather than to each application.
Explain homogeneous and heterogeneous system in distributed database.
Ans: distributed database system:
A distributed database system consists of loosely coupled sites that share no physical component Database systems that run on each site are independent of each other. Transactions may access data at one or more sites.

In a homogeneous distributed database:-
• All sites have identical software
• Are aware of each other and agree to cooperate in processing user requests.
• Each site surrenders part of its autonomy in terms of right to change schemas or software
• Appears to user as a single system.
In a heterogeneous distributed database:
• Different sites may use different schemas and software
• Difference in schema is a major problem for query processing
• Difference in software is a major problem for transaction Processing
• Sites may not be aware of each other and may provide only Limited facilities for cooperation in transaction processing.
what is knowledge based database system? Explain.
Ans: It is defined as a computer system used to manage and manipulate shared knowledge. Its manipulation facility includes a reasoning facility usuallt includeing aspects of one or more of the following forms of reasoning: Deductive, inductive, or abdcutive.
Comparison between KBMS and DBMS
In a DBMS the starting point is a data model to represent the data and the interrelationships between them; similarly the starting point of a KBMS is a knowledge representation scheme. The requirement for any knowledge representation scheme is adequacy, completeness, consistency, soundness and validity.
In addition since knowledge can be expressed as rules and exception to rules, Exception handling features must be present in the knowledge representation scheme. Furthermore the scheme should have some means of ensuring knowledge independence. Here independence signifies that the knowledge stored in the system must be insulated from changes is usage in its physical or logical structure. This concept is similar to the data independence concept used in a DBMS.
A KBMS is developed to solve the problem for a finite domain or portion of the real world. In developing such a system the designer select significant objects and relationship among these objects.
The DBMS and KBMS have similar architectures: both contain a component to model the information being managed by the system and have a subsystem to respond to queries.
One difference between the DBMS and KBMS is that KBMS handles a rather small amount of knowledge where as a DBMS efficiently handles large amount of shared data.
Explain data security in distributed database.
Ans: data security in distributed database: Security and protection problems are similar to those in the centralized database with remote access. However the problem is exacerbated by the fact that there is increased communication, including site- to site transfer of large amounts of data. This calls for appropriate identification and authentication of the user and the site. To prevent eavesdropping on the communication lines by intruders, these line must be secure and the message should be encrypted.
The fact that the data is replicated in the database means that a user can access any one of these replicated copies. Security dictates that authorization rules for access and update of certain parts of this data be verified before user action is allowed. If the authorization rules are centralized the authorization validation will generate traffic and central site would become the bottleneck.
Another approach is to replicate the authorization rules. Full replication allows local validation of user action at the time of compilation or execution of the user query. However replication adds unnecessary update overheads. Still another approach involves replicating at a given site, only those authorization rules that pertain to the data items at the site. The maintenance problem is improved but validation of a user’s action for a remote site can only be done at a remote site during an advance compilation or execution stage of the user’s query. Considerable computing efforts are wasted, since a query is aborted on discovery that the query lacks authorization for particular data items.
Q5d) What do you mean by distributed database. State its advantages.
Ans: A distributed database is a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network of interconnected computers.
Collections of data (e.g. in a database) can be distributed across multiple physical locations. A distributed database can reside on network servers on the Internet, on corporate intranets or extranets, or on other company networks. The replication and distribution of databases improves database performance at end-user worksites.
To ensure that the distributive databases are up to date and current, there are two processes: replication and duplication. Replication involves using specialized software that looks for changes in the distributive database. Once the changes have been identified, the replication process makes all the databases look the same. The replication process can be very complex and time consuming depending on the size and number of the distributive databases. This process can also require a lot of time and computer resources.
Duplication on the other hand is not as complicated. It basically identifies one database as a master and then duplicates that database. The duplication process is normally done at a set time after hours. This is to ensure that each distributed location has the same data. In the duplication process, changes to the master database only are allowed. This is to ensure that local data will not be overwritten. Both of the processes can keep the data current in all distributive locations.
Advantages of distributed databases
• Increase reliability and availability.
• Easier expansion.
• Reflects organizational structure — database fragments are located in the departments they relate to.
• Protection of valuable data — if there were ever a catastrophic event such as a fire, all of the data would not be in one place, but distributed in multiple locations.
• Improved performance — data is located near the site of greatest demand, and the database systems themselves are parallelized, allowing load on the databases to be balanced among servers. (A high load on one module of the database won't affect other modules of the database in a distributed database.)
• Economics — it costs less to create a network of smaller computers with the power of a single large computer.
• Modularity — systems can be modified, added and removed from the distributed database without affecting other modules (systems).
• Reliable transactions - Due to replication of database.
• Hardware, Operating System, Network, Fragmentation, DBMS, Replication and Location Independence.
• Continuous operation.
• Distributed Query processing.
• Distributed Transaction management.
What do you mean by distributed database. State its advantages.
Ans: A distributed database is a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network of interconnected computers.
Collections of data (e.g. in a database) can be distributed across multiple physical locations. A distributed database can reside on network servers on the Internet, on corporate intranets or extranets, or on other company networks. The replication and distribution of databases improves database performance at end-user worksites.
To ensure that the distributive databases are up to date and current, there are two processes: replication and duplication. Replication involves using specialized software that looks for changes in the distributive database. Once the changes have been identified, the replication process makes all the databases look the same. The replication process can be very complex and time consuming depending on the size and number of the distributive databases. This process can also require a lot of time and computer resources.
Duplication on the other hand is not as complicated. It basically identifies one database as a master and then duplicates that database. The duplication process is normally done at a set time after hours. This is to ensure that each distributed location has the same data. In the duplication process, changes to the master database only are allowed. This is to ensure that local data will not be overwritten. Both of the processes can keep the data current in all distributive locations.
Advantages of distributed databases
• Increase reliability and availability.
• Easier expansion.
• Reflects organizational structure — database fragments are located in the departments they relate to.
• Protection of valuable data — if there were ever a catastrophic event such as a fire, all of the data would not be in one place, but distributed in multiple locations.
• Improved performance — data is located near the site of greatest demand, and the database systems themselves are parallelized, allowing load on the databases to be balanced among servers. (A high load on one module of the database won't affect other modules of the database in a distributed database.)
• Economics — it costs less to create a network of smaller computers with the power of a single large computer.
• Modularity — systems can be modified, added and removed from the distributed database without affecting other modules (systems).
• Reliable transactions - Due to replication of database.
• Hardware, Operating System, Network, Fragmentation, DBMS, Replication and Location Independence.
• Continuous operation.
• Distributed Query processing.
• Distributed Transaction management.
what are the characteristics of expert Database system.
Ans: Experts systems also called knowledge bases systems, are computer systems designed to implement the knowledge and reasoning used by experts in a particular domain to solve the problems in that domain.
The structure of an expert system which is built around an appropriate representation of the domain knowledge of an expert is shown in fig. Many experts’ system use productions or rules to represent the domain knowledge. The inference systems use the knowledge and applies inferences procedure to inter facts not explicitly represented by in the knowledge base to solve the problems posed by the user. The inference system in addition provides the user with the steps used in the reasoning procedure to arrive at a solution to the problems. It is responsible for presenting the user with an easy-to-use interface and generates responses and under stable explanations to the queries posed by the user.


Expert system has been developed as standalone system. A stand alone expert system may be required to access data from as an ordinary application program. With an integrated approach the expert system is integrated with the DBMS. In addition to handle traditional data the system handle textual and graphical data as well as knowledge.
Such an integrated system will be called upon to perform the traditional DBMS functions and use the inference system in aspects of and deductive, inductive and deductive reasoning.
Explain concurrency control.
Ans: Concurrency control is the process of managing simultaneous execution of transaction in a multiprocessing database system without having them interfere with one another. This property of DBMS allows many transactions to access the same database at the same time without interfering with each other.
To prevent occurrences of error during concurrent access some of the method is presented as follows:
Resource locking:
Resource locking in distributed database: The problem due to concurrent access can be avoided by locking the required records when it is accessed for the transaction with respect to the user from Department X and releasing it after the updated data is written back into the respective record of the database so that the accessing of the required data for the transaction with respect to the user from Department Y is denied till the first transaction is fully executed by x. The sequence of actions to be carried out to have meaningful updates in the database with respect to the above example is presented below:
• Identify the required record with respect to the transaction of the user from Department.
• Lock that record.
• Read the content of that record and bring it to the working area.
• Write the content of the record in the working area.
• Write back the updated versions of the record in the database.
• Unlock that record for the other users.
• Lock the above record and proceed with the transaction of the user from the Department Y.
• Read the content of that record and bring it to the working area.
• Update the content of the record in the working area.
• Write back the updated versions of the record in the database.
The above discussion explains the fact that the resources should be locked and unlocked in a particular sequence to have better concurrency control. The database locked at different levels. The extent to which the database is locked is known as locking granularity. While executing a transaction then it is known as coarse granularity. If the required data within a single record with respect to the transaction is locked, then it is known as fine granularity.

Types of lock: The most common modes of lock user for locking transaction are shared-mode lock and Exclusive Lock. If a transaction has a shared lock on a data item of the database, then it can be read that data item but cannot write into that data item. If a transaction has an exclusive-mode lock on a data item of the database then that transaction can read that data item as well as write into that data item.
Locking protocol: There area two types locking protocol namely two-phase locking protocol and graphical based protocol. The two phase locking protocol establishes serializability. It has growing phase as well as shrinking phase. Each transaction has first growing phase and then shrinking phase.
Time stamp ordering protocol:
A timestamp of a transaction is the time of entry of that transaction into the system. This helps to determine the precedence relationship among the transactions. At any point of time let the largest time stamp of the transaction which executed Write operation on a data item successfully be W, and the largest timestamp of the transaction which executed read operation on that data item successfully be R.
The time stamp protocol helps to schedule conflicting read and write operations as explained below:
Scheduling of READ operation of a transaction:
1) If the transaction of the current read transaction is less than W, then the current transaction needs to read a value of the data item associated with W which has been already overwritten. Hence the reward operation of the current transaction rejected and the current transaction should be rolled back.
2) If the time stamp of the current read transaction is more than or equal to W, then the read operation of the current transaction should be executed. Also the value of the R should be updated for future references.
list the disadvantage of data distribution.
Ans: Disadvantages of data distribution:
• Complexity — extra work must be done by the DBAs to ensure that the distributed nature of the system is transparent. Extra work must also be done to maintain multiple disparate systems, instead of one big one. Extra database design work must also be done to account for the disconnected nature of the database — for example, joins become prohibitively expensive when performed across multiple systems.
• Economics — increased complexity and a more extensive infrastructure means extra labour costs.
• Security — remote database fragments must be secured, and they are not centralized so the remote sites must be secured as well. The infrastructure must also be secured (e.g., by encrypting the network links between remote sites).
• Difficult to maintain integrity — but in a distributed database, enforcing integrity over a network may require too much of the network's resources to be feasible.,
• Inexperience — distributed databases are difficult to work with, and as a young field there is not much readily available experience on proper practice.
• Lack of standards — there are no tools or methodologies yet to help users convert a centralized DBMS into a distributed DBMS.
• Database design more complex — besides of the normal difficulties, the design of a distributed database has to consider fragmentation of data, allocation of fragments to specific sites and data replication.
• Additional software is required.
• Operating System should support distributed environment.
• Concurrency control: it is a major issue. It is solved by locking and timestamping.
Explain deadlock in concurrency control.
Ans: Resource locking solves the problem of concurrent access but brings a new problem called deadlock/deadly embrace. Dead lock is an infinite locking of two resources one by one by each user wanting for the other resources for his next immediate use.

Hence this infinite locking should be avoided; there are two methods for avoiding this infinite locking which are listed below:
1) deadlock prevention
2) deadlock resolution
Deadlock prevention:
Deadlock prevention aims to avoid the occurrences of deadlocks. a simple mechanism of deadlock prevention is the one in which all necessary records of the transaction of a particular user are locked together by that user and those records will become available for other users only after unlocking them by the present user after completing his transaction fully. But this method introduces further difficulties of identifying the set of records required for a particular transaction. There are two more schemes to prevent deadlocks which are presented below:
Wait-die scheme:
In this scheme, if the time stamp of the current transaction accessing a data item is lesser than the timestamp of the transaction holding that data item, then the current transaction will be allowed to wait; otherwise it will be rolled back which is called a die state. This scheme operates on non-pre-emptive basis. In this scheme, an older transaction should wait for younger transaction.

Wound-wait scheme:
In this scheme, if the timestamp of the current transaction accessing a data item is greater than the timestamp of the transaction holding that data item, then the current transaction will be allowed to wait; otherwise it will be wounded and rolled back which is called as wound state. This scheme operates on pre-emptive basis. In this scheme, whenever a transaction is rolled back it is again restarted and it waits for the data item if the same is not available.
Timeout based scheme: in this each transaction is assigned a maximum time limit up to which it waits when it is seeking lock over a data item. If the transaction is not granted lock within that maximum time limit, it is rolled back and restarted again.
Deadlock Resolution:
It allows first deadlock occurs. Then using certain technique deadlock is detected and resolved. The DBMS should have a module to do this task. The deadlock detection algorithms invoked at different points in time. The frequency of algorithm will be invoked at different points in time. The frequency of invoking the algorithm depend s on the frequency of occurrences of deadlock as well as the number of transaction affected by the deadlock.
what do you mean by database security. Explain any technique in brief.
Ans: Database security concerns the use of a broad range of information security controls to protect databases (potentially including the data, the database applications or stored functions, the database systems, the database servers and the associated network links) against compromises of their confidentiality, integrity and availability. It involves various types or categories of controls, such as technical, procedural/administrative and physical. Database security is a specialist topic within the broader realms of computer security, information security and risk management. There are three types of security mechanism:
1) User with password and complete authorization
2) User with password and limited authorization:
3) Encryption of data
1) User with password and complete authorization:
A password will enable a person to enter into a database system. In a simple database system, all the users who enter the system can have all the rights (read, insert, modify and delete) this type of complete authorization to all the users can exist in a simple system where each and every user has equal importance and right. Under this situation, we assume that each user is highly responsible, any intentional or unintentional damage to the database will not create any serious problem and always the database can be reconstructed, and the time limit on the response time for each transaction is not constraint. But this type of security in database system is very rare to exist.
Explain user with password security mechanism.
Ans: User with password and complete authorization: : Database security concerns the use of a broad range of information security controls to protect databases (potentially including the data, the database applications or stored functions, the database systems, the database servers and the associated network links) against compromises of their confidentiality, integrity and availability. It involves various types or categories of controls, such as technical, procedural/administrative and physical. Database security is a specialist topic within the broader realms of computer security, information security and risk management. There are three types of security mechanism:
1) User with password and complete authorization
2) User with password and limited authorization:
3) Encryption of data
1) User with password and complete authorization:
A password will enable a person to enter into a database system. In a simple database system, all the users who enter the system can have all the rights (read, insert, modify and delete) this type of complete authorization to all the users can exist in a simple system where each and every user has equal importance and right. Under this situation, we assume that each user is highly responsible, any intentional or unintentional damage to the database will not create any serious problem and always the database can be reconstructed, and the time limit on the response time for each transaction is not constraint. But this type of security in database system is very rare to exist.

User with password and limited authorization:
As mentioned earlier, in a real corporate system, each user who is having password will be allowed to enter the system. The users, who are allowed, will be given only the necessary authorization options to access the database mainly to safeguard it. The basic types of authorizations/actions are listed below:

• Reading the database
• Inserting a new record into the database
• Modifying the contents of a record
• Deleting some records from a file of the database
There are some advanced authorizations like adding a new file or field, deleting an existing file or field. These actions will warrant changes in the metadata and even in the conceptual design of the database hence, these must be exercised with greater caution.
what are the different method for resource locking to have concurrency control? Compare and contrast them.
Ans: Resource locking:
Resource locking in distributed database: The problem due to concurrent access can be avoided by locking the required records when it is accessed for the transaction with respect to the user from Department X and releasing it after the updated data is written back into the respective record of the database so that the accessing of the required data for the transaction with respect to the user from Department Y is denied till the first transaction is fully executed by x. The sequence of actions to be carried out to have meaningful updates in the database with respect to the above example is presented below:
• Identify the required record with respect to the transaction of the user from Department.
• Lock that record.
• Read the content of that record and bring it to the working area.
• Write the content of the record in the working area.
• Write back the updated versions of the record in the database.
• Unlock that record for the other users.
• Lock the above record and proceed with the transaction of the user from the Department Y.
• Read the content of that record and bring it to the working area.
• Update the content of the record in the working area.
• Write back the updated versions of the record in the database.
The above discussion explains the fact that the resources should be locked and unlocked in a particular sequence to have better concurrency control. The database locked at different levels. The extent to which the database is locked is known as locking granularity. While executing a transaction then it is known as coarse granularity. If the required data within a single record with respect to the transaction is locked, then it is known as fine granularity.

Types of lock: The most common modes of lock user for locking transaction are shared-mode lock and Exclusive Lock. If a transaction has a shared lock on a data item of the database, then it can be read that data item but cannot write into that data item. If a transaction has an exclusive-mode lock on a data item of the database then that transaction can read that data item as well as write into that data item.
Locking protocol: There are two types locking protocol namely two-phase locking protocol and graphical based protocol. The two phase locking protocol establishes serializability. It has growing phase as well as shrinking phase. Each transaction has first growing phase and then shrinking phase. Tree based protocol is an example of graph based protocol. In the tree based protocol a data item can be locked provide the following conditions are satisfied.
• The first lock by a current transaction can be on any data item in the database.
• Subsequent locking should be on a data item whose parent data item in the database has been already locked by the current transaction.
• Unlocking of data item is permitted at any point of time.
• A data item which has been recently locked and unlocked cannot be immediately locked again by the same transaction.
Time stamp ordering protocol:
A timestamp of a transaction is the time of entry of that transaction into the system. This helps to determine the precedence relationship among the transactions. At any point of time let the largest time stamp of the transaction which executed Write operation on a data item successfully be W, and the largest timestamp of the transaction which executed read operation on that data item successfully be R.
The time stamp protocol helps to schedule conflicting read and write operations as explained below:
Scheduling of READ operation of a transaction:
1) If the transaction of the current read transaction is less than W, then the current transaction needs to read a value of the data item associated with W which has been already overwritten. Hence the reward operation of the current transaction rejected and the current transaction should be rolled back.
2) If the time stamp of the current read transaction is more than or equal to W, then the read operation of the current transaction should be executed. Also the value of the R should be updated for future references.
Describe in encryption of data in database.
Ans: Sensitive data can be protected using encryption technique. Encryption is a method of randomizing a meaningful data and storing in that form when it is not used. At the time of using the data the encrypted data will be decrypted to its original meaningful form. Such mechanism will safeguard the sensitive data from unauthorized access/ intentional tempering.
Tree based encryption technique:
The sensitive data can be encrypted in a tree form by following some order an then it can be decrypted in the reverse order.
Consider the following sequence of data which needs encryption.
A, b, c, d, e, f, h, i, j, k, l, m, n, o
This sequence of data can be loaded onto a binary tree horizontally from left to right starting from the level 0 and ending with the level 3 as shown in fig.

These data can be read using tree traversal algorithm starting from the left lost branch and ending with the right most branch a given below.
a, b, d, h, I, e, j, k, c, f, l, m, g, n, o
The above encrypted sequences of data will be stored in the database when it is not used. At the time of using the data the encrypted sequence of data should be copied onto the tree with the same specification using the same tree traversal algorithm starting from the left most branches and ending with the right most branches.
Later the data will be decrypted by reading them horizontally from left to right starting from the level 0 and ending with the level 3. This gives the original sequence:
a, b, c, d, e, f, g, h, I, j, k, l, m, n, o
This specification of the tree namely the degree of nonleaf nodes and the number of levels can be changed from time to time so that others will not know these specifications. This will ensure the secrecy of specifications.
Explain expert database system.
Ans: Expert system is used to propagate scarce knowledge resources for improved and consistent results. These are backed with a sound knowledge base which helps to avail the expertise of the specialist in the field. So expert system can replicate human advisors and replace them, provide support to persons (mainly) and groups, and are used for problems which are repetitive in nature. In expert system, the machine queries the human.
Expert system has two major parts, viz. development environment and consultation environment.
The components of the development environment are:
• Knowledge base
• Knowledge engineer
• Expert
• Interpreter
• Scheduler
• Consistency enforcer
A knowledge base consists of facts and rules. The knowledge engineer does the job of knowledge acquisition from expert and adds the information to the knowledge base.
An interpreter processes the chosen agenda items based on the corresponding knowledge base rules. A scheduler maintains control over the agenda. A consistency enforcer does the task of consistent representation of different solutions. The components of the consultation environment are as follows:
• Inference engine
• Blackboard
• User
The inference engine draws conclusions. This is the first task of the consultation environment. Blackboard is a workplace to plan agenda and describe solution of the problem. The user may be of different types-non-expert client, a student who learn DSS, an ES builder who is keen on improving the knowledge base or an expert trying to seek information in a another area.
what is recovery? Explain forward recovery of data.
Ans: A database is a centralized facility for the entire organization. When it is accessed and used by several users of the organization, several types of failure are bound to occur. These failures will affect the contents of the database which are highly sensitive in the current growing global business environment. If there is damage to the database, then one can identify the activities which are performed just prior to the point of failure of the database system. Based on this detail, the database is to be restored as quickly as possible to the state just prior to the occurrence of the damage. This is called recovery.
Forward recovery:
Forward recovery is used in situations where the data is damaged and hence the database should be restored from its most recent backup. It is alternatively known as roll-forward procedures.
The forward recovery procedure does the following steps:-
1. Gets the most recent backup copy of the database.
2. Applies ‘after images’ of records associated with good transactions performed since the most recent backup onto the most recent backup copy of the database.

This method is relatively faster than the backward recovery, because the overhead time involved in this method is less. But, it has the risk of executing wrong sequence of transactions as in the restore/rerun method. But a careful catalogue of the steps of the aborted transactions will help to do forward recovery accurately.
Discuss the need for concurrence control with a suitable example.
Ans: Process of managing simultaneous operations on the database without having them interfere with one another.
• Prevents interference when two or more users are accessing database simultaneously and at least one is updating data.
• Although two transactions may be correct in themselves, interleaving of operations may produce an incorrect result.
Need for Concurrency Control
Three examples of potential problems caused by concurrency:
• Lost update problem
• Uncommitted dependency problem
• Inconsistent analysis problem.
Successfully completed update is overridden by another user.
Example:
• T1 withdraws £10 from an account with balx, initially £100.
• T2 deposits £100 into same account.
• Serially, final balance would be £190.

Loss of T2's update!!
This can be avoided by preventing T1 from reading balx until after update.
Occurs when one transaction can see intermediate results of another transaction before it has committed.
Example:
• T4 updates balx to £200 but it aborts, so balx should be back at original value of £100.
• T3 has read new value of balx (£200) and uses value as basis of £10 reduction, giving a new balance of £190, instead of £90.
How a distributed database designed for a local area network differ for a wide area network.
Ans: Distributed database In a Distributed Database System the database is stored/spread physically across computers or sites in different locations that are connected together by some form of data communication network. They may be spread over WAN or LAN. The computers may be of different types such as IBM Mainframes, VAXs, SUN work station, PCs etc managed by different operating systems and each fragment of the data base may be managed by a different DBMS such as Oracle, Ingress, and Microsoft SOL server.
Distributed database design: The methodology used for the logical design of a centralized database applies to the design of the distributed one as well. However, for a distributed database three additional factors have to be considered.
• Data Fragmentation: Before we decide how to distribute the data we must determine the logical units of distribution. The database may be broken up into logical units called fragments which will be stored at different sites. The simplest logical units are the tables themselves.
o Horizontal fragmentation: A horizontal fragment of a table is a subset of rows in it. So horizontal fragmentation divides a table 'horizontally' by selecting the relevant rows and these fragments can be assigned to different sides in the distributed system (for ex. Euston Road branch gets the fragment where myTable.branch ='Euston Road').
o Vertical fragmentation: a vertical fragment of a table keeps only certain attributes of it. It divides a table vertically by columns. It is necessary to include the primary key of the table in each vertical fragment so that the full table can be reconstructed if needed.
o Mixed fragmentation: in a mixed fragmentation each fragment can be specified by a SELECT-PROJECT combination of operations. In this case the original table can be reconstructed be applying union and natural join operations in the appropriate order.
• Data Replication: A copy of each fragment can be maintained at several sites. Data replication is the design process of deciding which fragments will be replicated.
• Data Allocation: Each fragment has to be allocated to one or more sites, where it'll be stored.
There are three strategies regarding the allocation of data:
o Fragmented (or Partitioned): The database is partitioned into disjoint fragments, with each fragment assigned to one site (no replication). This is also called 'non-redundant allocation'.
o Complete replication: A complete copy of the database is maintained at each site (no fragmentation). Here, storage costs and communication costs for updates are most expensive. To overcome some of these problems, snapshots are sometimes used. A snapshot is a copy of the data at a given time. Copies are updated periodically.
o Selective replication: A combination of fragmentation and replication.
Give conditions to be taken into account to facilitate recovery of atomic transaction. Explain KBMS.
Ans: Atomic transaction implies that it will run to completion as an indivisible unit at the end of which either no changes have occurred to the database or the database has been changed in a consistent manner. At the end of transaction the updates made by the transaction will be accessible to other transaction and the processes outside the transaction.
: It is defined as a computer system used to manage and manipulate shared knowledge. Its manipulation facility includes a reasoning facility usuallt includeing aspects of one or more of the following forms of reasoning: Deductive, inductive, or abdcutive.
Comparison between KBMS and DBMS:
In a DBMS the starting point is a data model to represent the data and the interrelationships between them; similarly the starting point of a KBMS is a knowledge representation scheme. The requirement for any knowledge representation scheme is adequacy, completeness, consistency, soundness and validity.
In addition since knowledge can be expressed as rules and exception to rules, Exception handling features must be present in the knowledge representation scheme. Furthermore the scheme should have some means of ensuring knowledge independence. Here independence signifies that the knowledge stored in the system must be insulated from changes is usage in its physical or logical structure. This concept is similar to the data independence concept used in a DBMS.
A KBMS is developed to solve the problem for a finite domain or portion of the real world. In developing such a system the designer select significant objects and relationship among these objects.
The DBMS and KBMS have similar architectures: both contain a component to model the information being managed by the system and have a subsystem to respond to queries.
One difference between the DBMS and KBMS is that KBMS handles a rather small amount of knowledge where as a DBMS efficiently handles large amount of shared data.
Q5d) Consider a case of computer related fraud you are familiar with. List security and integrity constraint that should have been implemented.
Ans: List security and integrity constraint or defense mechanism : Four levels of defense are generally recognized for database security: human factors, physical security, administrative controls, and the security and integrity mechanism are built into the operating system.
Human factors: An organization usually perform some type of clearance, procedure for personnel who are going to be dealing with sensitive information, including that contained in database.
Physical security: It includes appropriate lock and keys and entry logs to computing facility and terminals. Security of physical storage devices within the organization and when being transmitted from one location to another must be maintained. Access to computing facility must be guarded, since authorized persons can make copies of files by bypassing the normal security mechanism built into the DBMS and the operating system.
Administrative control: these are the security and access control policies that determines what information will be accessible to what class of users, and the type of access that will be allowed to this class.
Q5a) Distinguish between objects and subjects from the view point defining authorization rules. Give suitable example.
Ans: Authorization may be with respect to either subject or objects. A subject is an organizational entity which can access the database. For example billing clerk, stores manager, customers etc are considered to be subjects. An object is database entity which must be protected by authorization rules. For example sales records, authors records publishers record, etc. of the alpha book house database are considered to be objects.
A sample set of authorization options for specific objects on different objects as well as authorization options for different subjects on specific objects are illustrated in fig (a) and Fig (B) respectively. Fig (a) summarizes the authorization options for the billing clerk on objects , customer records and sales records and fig (b) represents authorization options for different subjects e. g. ‘billing clerk’ and fig (b) represents the authorization options for different subjects e. g. billing clerk’,’ stores manger’ and customer on internet’ on the object ‘ authors records’.

Describe private key crypto - system. Give the complexities of the encryption and decryption algorithm in cryptosystem.
Ans: Encryption could be defined as: "The conversion of plaintext or data into unintelligible form by means of a reversible translation, based on a translation table or algorithm." In other words, encryption is the process of taking some data (usually called plaintext) and obfuscating it (usually with the use of some key) so that it cannot be read by others (those who do not have the correct key). The resultant data is usually called ciphertext. Conversely, the processes of taking the ciphertext and deciphering it back to its original form (usually using a key) is called decryption. Thus, decryption is defined as: "The translation of encrypted text or data (called ciphertext) into original text or data (called plaintext)."[2]
Figure 1 gives provides a classical view of encryption. In it we can see the plaintext being fed into an algorithm of some sort, a key applied as an input as well, and ciphertext being produced as output. Then that same ciphertext can be fed into the decrypting algorithm, with the same key supplied as an input, to produce the plaintext output.

Types of Encryption Algorithms
We will be covering two major types of encryption algorithms in this section: symmetric encryption (also called private-key or shared-key encryption) and asymmetric encryption (also called public-key encryption).

Symmetric Encryption:
This system uses only private keys. This requires the private key (code) to be installed on specific computers that will be used for exchanging messages between certain users. The system works pretty much like two best friends using a decoder ring to send secret messages to each other. Both friends know which code they are using and thus, only they will have the key to crack and encode secret messages.
Explain the following actions in recovery from deadlock:
i) Selection of victim
ii) Roll back
iii) Starvation
• Ans: Once it is determined that a deadlock occurs, the system needs to recover from the deadlock. For this, one or more transactions are rolled back to break the deadlock. While performing the roll back operation, the following issues need to be addressed :

i) Selection of a victim : in the situation of a deadlock, you first need to determine the transaction (or transaction) that should be rolled back to break the deadlock. Such a transaction is called the victim transaction. The transaction that will lead to minimum loss, in terms of cost, should be chosen for rollback. The following factors determine the cost of a rollback :
* How much execution has the transaction completed and for how much more time the transaction will execute to complete its task?
* How many data items were used by the transaction?
* How many more data items does the transaction need to complete?
* How many transaction will be included in the rollback?
ii) Rollback
: after determining the transaction to be rolled back, you need to determine how far the transaction is to be rolled back. The answer to this problem is to do a total rollback, which means that the transaction will be aborted and restarted. However, it is better to roll back the transaction only till the point where the deadlock can be broken. This method requires the DBMS to maintain information about all current transaction.
3) Starvation : when the selection of a victim is based on cost factors, it might happen that the same transaction is selected as a victim every time a deadlock occurs. Due to this, the transaction might not be able to complete its task. Such a situation is called starvation. To avoid starvation, you need to ensure that a transaction is picked as a victim for only a fixed number of times. To ensure this, you can select a victim based on the number of rollbacks along with the cost factor.
For accessing computer programs go to TECHNOLOGY