Você está na página 1de 5

UNIT II - OBJECT ORIENTED DATABASES TWO MARKS 1. What us object databases?

Became commercially popular in mid 1990s You can store the data in the same format as you use it. No paradigm shift. Did not reach full potential till the classes they store were decoupled from the database schema. Open source implementation available low cost solution now exists.

2. What is Object Oriented Database? (OODB) A database system that incorporates all the important object-oriented concepts Some additional features o Unique Object identifiers o Persistent object handling Is the coupling of Object Oriented (OOP) Programming principles with Database Management System (DBMS) principles o Provides access to persisted objects using the same OO-programming language

3. What are the advantages of OODBS? Designer can specify the structure of objects and their behavior (methods) Better interaction with object-oriented languages such as Java and C++ Definition of complex and user-defined types Encapsulation of operations and user-defined methods

4. List out the Object Database Vendors. Matisse Software Inc., Objectivity Inc., Poet's FastObjects, Computer Associates, eXcelon Corporation Db4o

5.

Differentiate OODB and Relational DB? OODB Uses an OO model. Data is a collection of objects whose behavior, state, and relationships are stored as a physical entity. Language dependence (OO Language specific. Relational DB Uses record-oriented model. Data is a collection of record types (relations), each having collection of records or tuples stored in a file. Language independence (via SQL)

No impedance mismatch in application using OODB.

Impedance mismatch in OO application. Mapping must be performed.

6.

Write about modeling and design in OODBMS.

Basically, an OODBMS is an object database that provides DBMS capabilities to objects that have been created using an object-oriented programming language (OOPL). The basic principle is to add persistence to objects and to make objects persistent. Consequently application programmers who use OODBMSs typically write programs in a native OOPL such as Java, C++ or Smalltalk, and the language has some kind of Persistent class, Database class, Database Interface, or Database API that provides DBMS functionality as, effectively, an extension of the OOPL.

7. What is Object data modeling? An object consists of three parts: structure (attribute, and relationship to other objects like aggregation, and association), behavior (a set of operations) and characteristic of types (generalization/serialization). An object is similar to an entity in ER model; therefore we begin with an example to demonstrate the structure and relationship.

8. Define Attributes. Attributes are like the fields in a relational model. However in the Book example we have,for attributes publishedBy and writtenBy, complex types Publisher and Author,which are also objects. Attributes with complex objects, in RDNS, are usually other tableslinked by keys to the employee table.

9. Define Relationships. Relationships: publish and written by are associations with I: N and 1:1 relationship; composed of is an aggregation (a Book is composed of chapters). The 1: N relationship is usually realized as attributes through complex types and at the behavioral level. For example,

10. What is Generalization and serialization? Generalization/Serialization is a relationship, which is supported in OODB through class hierarchy. An ArtBook is a Book, therefore the ArtBook class is a subclass of Book class. A subclass inherits all the attribute and method of its superclass.

11. Define Message. Message: means by which objects communicate, and it is a request from one object to another to execute one of its methods. For example: Publisher_object.insert (Rose, 123,) i.e. request to execute the insert method on a Publisher object )

12. Define Method.

Method: defines the behavior of an object. Methods can be used to change state by modifying its attribute values. To query the value of selected attributes the method that responds to the message example is the method insert defied in the Publisher class.

13. What are the drawbacks of persistent programming languages? o Due to power of most programming languages, it is easy to make programming errors that damage the database. o Complexity of languages makes automatic high-level optimization more difficult. o Do not support declarative querying as well as relational databases 14. What are the types of Query languages? Declarative query language Not computationally complete Syntax based on SQL (select, from, where) Additional flexibility (queries with user defined operators and types) 15. Give an example for Complex Data? A Water Resource Management example A database of state wide water projects Includes a library of picture slides Indexing according to predefined concepts prohibitively expensive 16. What are the types of queries can be used in water resource management? 1. 2. 3. Geographic locations Reservoir levels during droughts Recent flood conditions, etc

1. 2. 3.

17. What is Mutiversion concurrency control? Multiversion concurrency control (abbreviated MCC or MVCC), in the database field of computer science, is a concurrency control method commonly used by database management systems to provide concurrent access to the database and in programming languages to implement transactional memory. 18. What are types of failures? System crashes: due to hardware or software errors, resulting in loss of main memory. Media failures: due to problem with disk head or unreadable media Application errors: due to logical errors in the program which may cause transactions to fail. Natural disasters: physical loss of media. (Fire, food, earth quakes, terrorism, etc) Sabotage: intentional corruption or destruction of data. Carelessness: unintentional destruction of data by user or operator. 19. What are the general failures? Transaction failures Transaction aborts System failures failure of processor, main memory, power supply Media failures failure of secondary storage

20. What is meant by concurrency control?

Concurrency control ensures that correct results for concurrent operations are generated, while getting those results as quickly as possible. Thus concurrency control is an essential element for correctness in any system where two database transactions or more, executed with time overlap, can access the same data, e.g., virtually in any general-purpose database system.

21. What is meant by media recovery? Media recovery deals with failures of the storage media holding the permanent database, in particular disk failures. The traditional database approach for media recovery uses archive copies (dumps) of the database as well as archive logs. Archive copies represent snapshots of the database and are periodically taken. The archive log contains the log records for all committed changes which are not yet reflected in the archive copy.

22. Define logging and recovery. Logging and recovery ensure that failures are masked to the users of transaction-based data management systems by providing automatic treatment for different kinds of failures, such as transaction failures, system failures (crashes), media failures and disasters. The main goal is to guarantee the atomicity (A) and durability (D) properties of ACID transactions by providing undo recovery for failed transactions and redo recovery for committed transactions. Logging is the task of collecting redundant data needed for recovery

23. What is meant by transaction? A transaction comprises a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. 24. What are the two main purposes of transaction? 1. To provide reliable units of work that allow correct recovery from failures and keep a database consistent even in cases of system failure, when execution stops (completely or partially) and many operations upon a database remain uncompleted, with unclear status. To provide isolation between programs accessing a database concurrently. If this isolation is not provided the programs outcome are possibly erroneous. 25. What is Crash recovery? Crash recovery is needed when the whole database (transaction) system fails, e.g. due to a hardware or software error. All transactions which were active and not yet committed at crash time have failed so that their changes must be undone. The changes for transactions that have committed before the crash must survive. A redo recovery is needed for all changes of committed transactions that have been lost by the crash because the changed pages resided only in main memory but were not yet written out to the permanent database.

2.

26. What is meant by disaster recovery? Disaster recovery can be achieved by maintaining a backup copy of the database at a geographically remote location. By continuously transferring log data from the primary database to the backup and applying the changes there, the backup can be kept (almost) up-to-date.

27. What is data persistence?

Data persistence means that in a DBMS all data is maintained as long as it is not deleted explicitly. The life span of data needs to be determined directly or indirectly be the user and must not be dependent on system features. Additionally data once stored in a database must not be lost. Changes of a database which are done by a transaction are persistent. When a transaction is finished even a system crash cannot put the data in danger.

28. Define transaction recovery. Transaction recovery (rollback) is performed when a transaction fails during normal Processing, e.g. due to a program error or invalid input data. The log records in the log buffer and in the log file are used to undo the changes of the failed transaction in reverse order.

Você também pode gostar