Advanced Database System

Set 1

1. Explain the theory of database internals. Ans: a) Indexing: The most common kind of index is a sorted list of the contents of some particular table column, with pointers to the row associated with the value. An index allows a set of table rows matching some criterion to be located quickly. Various methods of indexing are commonly use; B-trees, ashes and linked lists are all common indexing b) Transactions and concurrency: In addition to their data model, most practical databases attempt to enforce a database transaction. Ideally, the database software should enforce the ACID rules, summarized here. Atomicity, Consistency, Isolation, Durability. c) Replication: replication of databases is closely related to transactions. If a database can log its individual actions, it is possible to create a duplicate of the data in rest time. The duplicate can be use to improve performance or availability of the whole database system. Common replication concept includes – master/Slave Replication, Quorum, Multimaster. 2. Describe the following with respect to Query processing: A) Query Optimizer: Is the component of database management system that attempts to determine the most efficient way to execute a query. The optimizer considers the possible query plans for a given input query, and attempts to determine which of those plans will be the most efficient. Cost-based query optimizers assign an estimated “cost” to each possible query plan, and choose the plan with the least cost. Costs are used to estimate the runtime cost of evaluating the query, in terms of the number of I/O operations required, the CPU requirements, and other factors. B) Query Plan: A Query Plan is a set of steps used to access information in a SQL relational database management system. This is a specific case of the relational model concept of access plane. Since SQL is declarative, there are typically a large number of alternative ways to executive a given query, with widely varying performance. When a query is submitted to the database, the query optimizer evaluates some of the different, correct possible plans for executing the query and returns what it considers the best alternative. Because query optimizers are imperfect, database users and administrators sometimes need to manually examine and tune the plans produced by the optimizer to get better performance. C) Implementation: Most query optimizers represent query plans as a tree of “plan nodes”. A plan node encapsulates a single operation that is requires to execute the query. The nodes are arranged as a true, in which intermediate results flow from the bottom of the tree to the top. Each node has zero or more child nodes – those are nodes whose output is fed as input of the parent node. 3. Explain the following with respect to Heuristics of Query Optimizations: A) Equivalence of Expressions: The first step in selecting a query-processing strategy is to find a relational algebra expression that is equivalent to the given query and is efficient to execute.

Manjunath B. J

Page No. 1

Advanced Database System

Set 1

B) Selection Operation: Consider the query to find the assets and branch-names of all banks who have depositors living in port Chester in relational algebra, this is Π bname, assests ( σ ccity='Port "Chester" (customer |X| deposit |X| branch)) C) Projection Operation: Like selection, projection reduces the size of relations. It is advantageous to apply projections early. Consider this form of our example query: Π bname, assests ((( σ ccity='Port "Chester"(customer)) |X| deposit |X| branch) D) Natural Join Operation: Another way to reduce the size of temporary results is to choose an optimal ordering of the join operations. Natural join associative: (r1 |X| r2) |X| r3 = r1 |X|(r2|X|r3) 4. Explain the following: A) Data Management Functions: The primary objective for a data management system, DMS, is to provide efficient and effective management of the database. This includes providing functions for data storage, retrieval, secure modification, DB integrity and maintenance. There are two principle quality measures for a DMS; efficiency and effectiveness. B) Database Design & Creation: Prior to establishing a database, the database administrator, DBA, should create a data model to describe the intended content and structure for the DB. It is this model that is the basis for specification of the Data definition Language, DDL statements necessary for construction of the DB schema and the structure for the DB storage areas. C) Information & Data Retrieval: The term information and data are often used interchangeably in the data management literature causing some confusion in interpretation of the goals of different data management system types. It is important to remember that despite the name of a data management system type, it can only manage data these data are representations of information. 5. Describe the Structural Semantic Data Model (SSM) with relevant examples. Ans: SSM was developed as teaching tool and has been and can continue to be modified to include new modeling concepts. A particular requirement today is the inclusion of concepts and syntax symbols for modeling multimedia objects. Concepts Entity(object ) Entity type Definition Something of interest to the information system about which data is collected A set of entities sharing common attributes Examples A person, student, customer, employee, department, product exam, order… Citizens of Norway Person (Name, Address...)

Manjunath B. J

Page No. 2

Advanced Database System
Subclass, superclass entity type Shared Subclass entity type Category entity type A sub-class entity type is a specialization, of, alternatively a role played by, a superclass entity type. A shared subclass entity type has characteristics of 2 or more parent entity types A subclass entity type of 2 or more district / independent super-class entity types

Set 1
Subclass : Superclass Student IS_A person Teacher IS_A Person A student-assistant IS_BOTHA student and an employee An owner IS_EITHERA Person or an organization

6. Explain the following concepts with respect to SQL3: A) Result Presentation: An SQL3-based ORDBMS will return all attributes specified in the SELECT clause even if the document body has been stored externally to the table and replaced by a link. However, it can only order the result set according to the values of regular attributes. It is not meaningless to sort large documents by their ‘whole’ content, nor is it particularly helpful to the documents by heir order in the DB B) Image Retrieval: Popular knowledge claims that an image is worth 1000 words. Unfortunately, these 1000 words may differ from one individual to another depending on their perspective and/or knowledge of the image context. For example, a familiar demonstration that an image can have multiple, quite different interpretations. Thus even if a 1000-world image description were available, it is not certain that the image could be retrieved by a user with a different description. The problem is fundamentally one of communication between an information/image seeker/user and the image retrieval system. Since user may have differing needs and knowledge about the image collection an image collection, an image retrieval system must support various forms for query formulation.

Manjunath B. J

Page No. 3

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.