Database Technology

  • View
    176

  • Download
    0

Embed Size (px)

Text of Database Technology

ANNA UNIVERSITY- CHENNAI-JUNE 2010 & DECEMBER 2010 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING SUB CODE/SUB NAME: CS9221 / DATABASE TECHNOLOGY

Part A (10*2=20 Marks)1. What is fragmentation? (JUNE 2010)

Fragmentation is a database server feature that allows you to control where data is stored at the table level. Fragmentation enables you to define groups of rows or index keys within a table according to some algorithm or scheme. You use SQL statements to create the fragments and assign them to dbspaces.

2. What is Concurrency control? (JUNE 2010) (NOV/ DEC 2010)

Concurrency control is the activity of coordinating concurrent accesses to a database in a multiuser system. Concurrency control allows user to access a database in a multiprogrammed fashion while preserving the consistency of the data.

3. What is Persistence? (JUNE 2010) (NOV/ DEC 2010)

Persistence is the property of an object through which its existence transcends time i.e. (the object continues to exist after its creator ceases to exist), and/or space (i.e. the objects location moves from the address space in which it was created).

4. What is Transaction Processing? (JUNE 2010)

A Transaction Processing system (TPS) is a set of information which processes the data transaction in database system that monitors transaction programs (a special kind of program). For e.g. in an electronic payment is made, the amount must be both withdrawn from one account and added to the other; it cannot complete only one of those steps. Either both must occur, or neither. In case of a failure preventing transaction completion, the partially executed transaction must be 'rolled back' by the TPS.

5. What is Client/Server model? (JUNE 2010)

1

The server in a client/server model is simply the DBMS, whereas the client is the database application serviced by the DBMS. The client/server model of a database system is classified into basic & distributed client/server model.

6. What is the difference between data warehousing and data mining? (JUNE 2010)

Data warehousing: It is the process that is used to integrate and combine data from multiple sources and format into a single unified schema. So it provides the enterprise with a storage mechanism for its huge amount of data. Data mining: It is the process of extracting interesting patterns and knowledge from huge amount of data. So we can apply data mining techniques on the data warehouse of an enterprise to discover useful patterns.

7. Why do we need Normalization? (JUNE 2010)

Normalization is a process followed for eliminating redundant data and establishes a meaningful relationship among tables based on rules and regulations in order to maintain integrity of data. It is done for maintaining storage space and also for performance tuning.

8. What is Integrity? (JUNE 2010) (NOV/ DEC 2010)

Integrity refers to the process of ensuring that a database remains an accurate reflection of the universe of discourse it is modeling or representing. In other words there is a close correspondence between the facts stored in the database and the real world it models0

9. Give two features of Multimedia Databases (JUNE 2010) (NOV/ DEC 2010) The multimedia database systems are to be used when it is required to administrate a

huge amounts of multimedia data objects of different types of data media (optical storage,2

video, tapes, audio records, etc.) so that they can be used (that is, efficiently accessed and searched) for as many applications as needed. The Objects of Multimedia Data are: text, images, graphics, sound recordings, video recordings, signals, etc., that are digitalized and stored.

10.

What are Deductive Databases? (JUNE 2010) (NOV/ DEC 2010)

A Deductive Database is the combination of a conventional database containing facts, a knowledge base containing rules, and an inference engine which allows the derivation of information implied by the facts and rules.

A deductive database system specify rules through a declarative language - a language in which we specify what to achieve rather than how to achieve it. An inference engine within the system can deduce new facts from the database by interpreting these rules. The model used for deductive databases is related to the relational data model and also related to the field of logic programming and the Prolog language.

11.

What is query processing? (NOV/ DEC 2010)

Query processing is a set of activities involving in getting the result of a query expressed in a high-level language. These activities include parsing the queries and translate them into expressions that can be implemented at the physical level of the file system, optimizing the query of internal form to get suitable execution strategies for processing and then doing the actual execution of queries to get the results.

12.

Give two features of object-oriented databases. (NOV/ DEC 2010)

The features of Object Oriented Databases are, It provides persistent storage for objects. They may provide one or more of the following: a query language; indexing; transaction support with rollback and commit; the possibility of distributing objects transparently over many servers.3

13.

What is Data warehousing? (NOV/ DEC 2010)

Data warehousing: It is the process that is used to integrate and combine data from multiple sources and format into a single unified schema. So it provides the enterprise with a storage mechanism for its huge amount of data.

14.

What is Normalization? (NOV/ DEC 2010)

Normalization is a process followed for eliminating redundant data and establishes a meaningful relationship among tables based on rules and regulations in order to maintain integrity of data. It is done for maintaining storage space and also for performance tuning.

15.

Mention two features of parallel Databases. (NOV/ DEC 2010) It is used to provide speedup, where queries are executed faster because more

resources, such as processors and disks, are provided. It is also used to provide scaleup, where increasing workloads are handled without increased response time, via an increase in the degree of parallelism.

4

Part B (5*16=80 Marks) (JUNE 2010) & (DECEMBER 2010)

1. (a)Explain the architecture of Distributed Databases. (16) (JUNE 2010)

Or (b) Discuss in detail the architecture of distributed database. (16) (NOV/DEC 2010)

5

6

7

(b)Write notes on the following: (i) Query processing. (8) (JUNE 2010)8

9

10

11

12

(ii) Transaction processing. (8) (JUNE 2010) A transaction is a collection of actions that make consistent transformations of system states while preserving system consistency. concurrency transparency failure transparency13

Example Transaction SQL Version Begin_transaction Reservation begin input(flight_no, date, customer_name); EXEC SQL UPDATE FLIGHT SET STSOLD = STSOLD + 1 WHERE FNO = flight_no AND DATE = date; EXEC SQL INSERT INTO FC(FNO, DATE, CNAME, SPECIAL); VALUES (flight_no, date, customer_name, null); output(reservation completed) end . {Reservation} Properties of Transactions ATOMICITY all or nothing CONSISTENCY no violation of integrity constraints ISOLATION concurrent changes invisible E serializable DURABILITY committed updates persist These are the ACID Properties of Transaction Atomicity Either all or none of the transaction's operations are performed. Atomicity requires that if a transaction is interrupted by a failure, its partial results must be undone. The activity of preserving the transaction's atomicity in presence of transaction aborts due to input errors, system overloads, or deadlocks is called transaction recovery. The activity of ensuring atomicity in the presence of system crashes is called crash recovery. Consistency Internal consistency A transaction which executes alone against a consistent database leaves it in a consistent state. Transactions do not violate database integrity constraints.14

Transactions are correct programs. Isolation Degree 0 Transaction T does not overwrite dirty data of other transactions Dirty data refers to data values that have been updated by a transaction prior to its commitment. Degree 2 T does not overwrite dirty data of other transactions T does not commit any writes before EOT T does not read dirty data from other transactions Degree 3 T does not overwrite dirty data of other transactions T does not commit any writes before EOT T does not read dirty data from other transactions Other transactions do not dirty any data read by T before T completes. Isolation Serializability If several transactions are executed concurrently, the results must be the same as if they were executed serially in some order. Incomplete results An incomplete transaction cannot reveal its results to other transactions before its commitment. Necessary to avoid cascading aborts. Durability: Once a transaction commits, the system must guarantee that the results of its operations will never be lost, in spite of subsequent failures. Database recovery

15

Transaction transparency: Ensures all distributed Ts maintain distributed databases integrity and consistency.

Distributed T accesses data stored at more than one location. Each T is divided into no. of subTs, one for each site that has to be accessed. DDBMS must ensure the indivisibility of both the global T and each of the subTs.

Concurrency transparency: All Ts must execute independently and be logically consistent with results obtained if Ts executed in some arbitrary serial order.

Replication makes concurrency more complex

Failure transparency: must e