Posts

Showing posts with the label Advance Database

Define ODMG object model. What is object query language (OQL)?

Image
 ODMG object model  It is an object data management Group, (ODMG) The ODMG object model is the data model upon which the object definition language (ODL) and object query language (OQL) are based.  It is meant to provide a standard data model for object databases, just as SQL describes a standard data model for relational databases.  It also provides a standard terminology in a field where the same terms were sometimes used to describe different concepts.  Object query language (OQL)  OQL is an SQL-like declarative language that provides a rich environment for efficient querying of database objects, including high-level primitives for object sets and structures. OQL also includes object extensions for object identity, complex objects, path expressions, operation invocation, and inheritance. OQL's queries can invoke operations in ODMG language bindings, and OQL may be embedded in an ODMG language binding. The object query language OQL is the query language proposed for the ODMG obje

Why indexing is important to store data in databases? What is multilevel index?

Image
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space to maintain the index data structure. Indexes are used to quickly locate data without having to search every row in a database table every time a database table is accessed. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access to ordered records. Indexing is a way to optimize the performance of a database by minimizing the number of disk accesses required when a query is processed. It is a data structure technique that is used to quickly locate and access the data in a database.  The index is a database structure that can be used to improve the performance of database operations. Indexes can be added to a database table in different ways. In order to create an index, you specify a field expression. In general, the field expression is a singl

Define distributed database. What are the benefits of using distributed database over centralized database? Explain availability, reliability, and scalability features of distributed databases.

Image
  Distributed database (DDB)  A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (DDBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users. The distributed database (DDB) and distributed database management system (DDBMS) together are called Distributed database systems (DDBS). The benefits of using distributed database over centralized database  are as follows: Keeping track of data:  The ability to keep track of the data distribution, fragmentation, and replication by expanding the DDBMS catalog. Distributed query processing:  The ability to access remote sites and transmit queries and data amona g the various sites via a a communication network. Distributed transaction management:  The ability to devise execution strategies for queries and transactions that access data from more than one site a

What are different concepts and features of object-oriented databases? What is object relational model?

Image
 OBJECT-ORIENTED DATABASE CONCEPTS Object-oriented databases (OODB) are databases that represent data in the form of objects and classes. In object-oriented terminology, an object is a real-world entity, and a class is a collection of objects.  Object-oriented databases follow the fundamental principles of object-oriented programming (OOP). The combination of relational model features (concurrency, transaction, and recovery) with object-oriented principles results in an object-oriented database model.  Object-oriented databases add the database functionality to object programming languages, creating more manageable code bases. The main goal of object-oriented databases is to combine the advantages of object-oriented technologies and traditional (relational) databases.  Object-Oriented Databases - Examples There is a wide range of object-oriented databases. Some of the most well know are: Itasca 02 Versant FUNDAMENTAL FEATURES OF OBJECT-ORIENTED DATABASE There is a certain set of basic

Describe multimedia database and what are the different types of multimedia data that are available in current systems?

Image
 Multimedia database (MMDB)  A Multimedia database (MMDB) is a collection of related multimedia data. The multimedia data include one or more primary media data types such as text, images, graphic objects (including drawings, sketches, and illustrations) animation sequences, audio, and video. There is a number of data types that can be characterized as multimedia data types. These are typically the elements or the building blocks of ore generalized multimedia environments, platforms, or integrating tools. The basic types can be described as follows : 1. Text: The form in which the text can be stored can vary greatly. In addition to ASCII-based files, the text is typically stored in processor files, spreadsheets, databases, and annotations on more general multimedia objects. With the availability and proliferation of GUIs and text fonts the job of storing text is becoming complex allowing special effects(color, shades..). 2. Images: There is great variance in the quality and size of st

Describe the main reasons for the potential advantage for distributed database.

Image
  Distributed database (DDB)  A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (DDBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users. The distributed database (DDB) and distributed database management system (DDBMS) together are called Distributed database systems (DDBS). The main reasons for the potential advantage of distributed databases . / Distributed database management is basically proposed for various reasons from organizational decentralization and economic processing to greater autonomy. Some of these advantages are as follows: 1. Management of data with different levels of transparency – Ideally, a database should be distribution transparent in the sense of hiding the details of where each file is physically stored within the system. The following types of transparencies are basic

Discuss how time is represented in temporal databases and compare the different time dimensions.

Image
Temporal data stored in a temporal database is different from the data stored in the non-temporal database in that a time period attached to the data expresses when it was valid or stored in the database. As mentioned above, conventional databases consider the data stored in them to be valid at a time instant now, they do not keep track of past or future database states. By attaching a time period to the data, it becomes possible to store different database states. In the temporal base, database time is represented as an ordered sequence of points in granularity. It is determined by the application and for particular applications, temporal database researchers used the term ‘chronon’ in state of point to describe the minimal granularity.

Explain MapReduce with it's architecture .

Image
 MapReduce   Map-Reduce is a programming model designed for processing large volumes of data in parallel by dividing the work into a set of independent tasks. Map-Reduce programs are written in a particular style influenced by functional programming constructs, specific idioms for processing lists of data. This module explains the nature of this programming model and how it can be used to write programs that run in the Hadoop environment. MapReduce is a Hadoop framework used for writing applications that can process vast amounts of data on large clusters. It can also be called a programming model in which we can process large datasets across computer clusters. This application allows data to be stored in a distributed form. It simplifies enormous volumes of data and large-scale computing. There are two primary tasks in MapReduce: map and reduce. We perform the former task before the latter. In the map job, we split the input dataset into chunks. Map task processes these chunks in paral

Write short note on Indexing .

Image
 Indexing   Indexing is used to optimize the performance of a database by minimizing the number of disk accesses required when a query is processed. The index is a type of structure having only two columns. The first column comprises a copy of the primary or candidate Key of a table. The Second Column contains a set of pointers for holding the address of the disk block where Specific key values are stored. Advantages of indexing  Better performance of queries. Fast Searching from the database. Fast retrieval of data  Increase performance in SELECT query. Disadvantages of indexing Indexing takes more space. Decrease performance in INSERT, DELETE, and UPDATE query. Figure: Structure of index

Why do we need temporal database? Explain different time dimensions in this database.

Image
We need a temporal database because of the following reasons:- (i) A temporal database efficiently stores a time series of data, typically by having some fixed timescale and then storing only changes in the measured data. (ii) It prevents fragmentation of an object description. (iii) It provides query algebra to deal with temporal data. (iv) It is Compatible with the old databases without temporal data. (v) It maintains the past or historical values and the time at which data was updated.  The different time dimensions in this database that occur on the temporal database are: Valid time, Transaction time, bitemporal data Valid time Valid time is a time period during which a fact is true in the real world. Given a particular event or fact that is associated with a particular time point or time period in the database, the association may be interpreted to mean different things. The most natural interpretation is that the associated time is the time that the event occurred or the period d

Explain multimedia database in brief. What are the different applications of multimedia database?

Image
  Multimedia Database  A Multimedia database is the collection of interrelated multimedia data that includes text, graphics (sketches, drawings), images, animations, video, audio, etc., and has vast amounts of multisource multimedia data. The framework that manages different types of multimedia data which can be stored, delivered, and utilized in different ways is known as a multimedia database management system. Multimedia databases provide features that allow users to store and query different types of multimedia information, which includes images (such as photos or drawings), video clips (such as movies, newsreels, or home videos), audio clips (such as songs, phone messages, or speeches), and documents (such as books or articles). The main types of database queries that are needed involve locating multimedia sources that contain certain objects of interest. For example, one may want to locate all video clips in a video database that includes a certain person, say Michael Jackson. On

Explain document-based NOSQL system with example.

Image
  Document Databases Document databases, like JSON (JavaScript Object Notation) objects, store data in documents. Each document has a set of field and value pairs. The values might be of many sorts, such as texts, integers, Booleans, arrays, or objects, and their structures are usually aligned with the objects that developers interact with within code. Document databases are useful for a broad number of use cases and may be utilized as a general-purpose database due to their variety of field value types and strong query languages. They can expand out horizontally to accommodate enormous data volumes. A document database is a type of NoSQL database that stores data as JSON documents instead of columns and rows. JSON is a native language used to both store and query data. These documents can be grouped together into collections to form database systems. Each document consists of a number of key-value pairs.  Here is an example of a document that consists of 4 key-value pairs: { "ID&

Explain different techniques for distributed database design.(Data Fragmentation, Data Replication, Data Allocation)

Image
The different techniques for distributed database design are:- 1. Data Fragmentation, 2. Data Replication 3. Data Allocation                                                         1. Data Fragmentation, Fragmentation is the task of dividing a table into a set of smaller tables. The subsets of the table are called fragments. These fragments may be stored at different locations. Moreover, fragmentation increases parallelism and provides better disaster recovery. Fragmentation can be of three types: Vertical Fragmentation Horizontal Fragmentation Hybrid Fragmentation fragmentation should be done in a way so that the original table can be reconstructed from the fragments. This is needed so that the original table can be reconstructed from the fragments whenever required. This requirement is called "reconstructiveness". 2. Data Replication Data Replication is the process of generating and reproducing multiple copies of data at one or more sites. Replication is an important mechan

What is query tree? Why do we need this tree in query processing?

Image
Query tree A query tree represents a tree data structure representing relational algebra expression. The tables of query trees are represented as leaf the query nodes The relational algebra operations are represented as the Internal nodes. The root represents the query as a whole. Query Processing is the activities involved in parsing, validating, optimizing, and executing a query. We need this tree in query processing because: It reduces the size of the intermediate relations, both in terms of bytes per record as well as a number of records, as soon as possible so that subsequent operations will have fewer data to process and thus execute quicker. Operations, such as conjunctive selections, Should be broken down into their equivalent Set of Smaller units to allow the individual units to be moved into"better" positions within the query tree. Combining Cartesian products with corresponding selects to create joins-utilizing optimized join algorithms like the sort-merge join and

Explain object query language (OQL) with suitable example.

Image
Object query language (OQL)  OQL is an SQL-like declarative language that provides a rich environment for efficient querying of database objects, including high-level primitives for object sets and structures.OQL also includes object extensions for object identity, complex objects, path expressions, operation invocation, and inheritance. OQL's queries can invoke operations in ODMG language bindings, and OQL may be embedded in an ODMG language binding. The object query language OQL is the query language proposed for the ODMG object model. It is designed to work closely with the programming languages for which an ODMG binding is defined, such as C++, Smalltalk, and Java. Hence, an OQL query embedded into one of these programming languages can return objects that match the type system of that language. Additionally, the implementations of class operations in an ODMG schema can have their code written in these programming languages. The OQL syntax for queries is similar to the syntax o

What are the benefits of object-oriented database? What is object identity?

Image
The benefits of an object-oriented database are as follows:-  Enriched modeling capabilities The object-oriented data model allows the ‘real world’ to be modeled more closely. The object, which encapsulates both state and behavior, is a more natural and realistic representation of real-world objects. An object can store all the relationships it has with other objects, including many-to-many relationships, and objects can be formed into complex objects that the traditional data models cannot cope with easily. Extensibility OODBMSs allow new data types to be built from existing types. The ability to factor out common properties of several classes and form them into a super-class that can be shared with sub-classes can greatly reduce redundancy within a system and is regarded as one of the main advantages of object orientation. Further, the reusability of classes promotes faster development and easier maintenance of the database and its applications. Capable of handling a large variety of

Explain specialization and generalization with example.

Image
  Specialization Specialization is a process that defines a group of entities that is divided into subgroups based on their characteristic. It is a top-down approach, in which one higher entity can be broken down into two lower-level entities. It maximizes the difference between the members of an entity by identifying the unique characteristic or attributes of each member. It defines one or more subclass for the superclass and also forms the superclass/subclass relationship. For example: Generalization Generalization is the process of generalizing the entities which contain the properties of all the generalized entities. It is a bottom approach, in which two lower-level entities combine to form a higher-level entity. Generalization is the reverse process of Specialization. It defines a general entity type from a set of the specialized entity type. It minimizes the difference between the entities by identifying the common features. For example:

Why do we need query optimization in databases? Compare heuristic query optimization with cost-based query optimization.

Image
Query optimization Query optimization is the process of selecting an efficient execution plan for evaluating the query. The main goal of query optimization is to choose the best execution strategy for a given query under the given resource constraints. Query optimization reduces the system resources required to fulfill a query, and ultimately provides the user with the correct result. We need query optimization because of the following reasons:-  The goal of query optimization is to reduce the system resources required to fulfill a query and ultimately provide the user with the correct result set faster.  First, it provides the user with faster results, which makes the application seem faster to the user.  Secondly, it allows the system to service more queries in the same amount of time because each request takes less time than unoptimized queries.  Thirdly, query optimization ultimately reduces the amount of wear on the hardware (e.g. disk drives), and allows the server to run more ef

What is distributed database? Explain data fragmentation techniques in detail with suitable example.

Image
Distributed database (DDB)  A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (DDBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users. The distributed database (DDB) and distributed database management system (DDBMS) together are called Distributed database systems (DDBS). Data Fragmentation Fragmentation is the task of dividing a table into a set of smaller tables. The subsets of the table are called fragments. These fragments may be stored at different locations. Moreover, fragmentation increases parallelism and provides better disaster recovery. Fragmentation can be of three types: Vertical Fragmentation Horizontal Fragmentation Hybrid Fragmentation Fragmentation should be done in a way so that the original table can be reconstructed from the fragments. This is needed so that the original ta

Explain enhanced entity relationship model in detail. What is aggregation?

Image
 EER Model EER is a high-level data model that incorporates the extensions to the original ER model. It is a diagrammatic technique for displaying the following concepts Sub Class and Super Class Specialization and Generalization Union or Category Aggregation These concepts are used when they come in the EER schema and the resulting schema diagrams are called EER Diagrams. Features of the EER Model EER creates a design more accurate to database schemas. It reflects the data properties and constraints more precisely. It includes all modeling concepts of the ER model. The diagrammatic technique helps in displaying the EER schema. It includes the concept of specialization and generalization. It is used to represent a collection of objects that is the union of objects of different entity types. A. Sub Class and Super Class Sub-class and Super class relationships lead to the concept of Inheritance. The relationship between sub-class and superclass is denoted by the symbol. 1. Super Class Su