Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
MC0077 SMU MCA SEM4 2011

MC0077 SMU MCA SEM4 2011

|Views: 1,338|Likes:
Published by Nitin Sivach
MC0077 SMU MCA SEM4 2011
MC0077 SMU MCA SEM4 2011

More info:

Published by: Nitin Sivach on Dec 10, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





July 2011Master of Computer Application (MCA)
Semester 4MC0077
Advanced Database Systems(Book ID: B0882)Assignment Set
1Q: 1. Describe the following:
Dimensional Model
Object Database Models
Relational Database ModelsAns:Dimensional model
 The dimensional model is a specialized adaptation of the relational model used to represent data in datawarehouses in a way that data can be easily summarized using OLAP queries. In the dimensional model,a database consists of a single large table of facts that are described using dimensions and measures. Adimension provides the context of a fact (such as who participated, when and where it happened, and itstype) and is used in queries to group related facts together. Dimensions tend to be discrete and are oftenhierarchical; for example, the location might include the building, state, and country. A measure is a
quantity describing the fact, such as revenue. It’s important that measures can be meaningfully aggregated – 
for example, the revenue from different locations can be added together.In an OLAP query, dimensions are chosen and the facts are grouped and added together to create asummary.The dimensional model is often implemented on top of the relational model using a star schema,consisting of one table containing the facts and surrounding tables containing the dimensions. Particularlycomplicated dimensions might be represented using multiple tables, resulting in a snowflake schema.A data warehouse can contain multiple star schemas that share dimension tables, allowing them to beused together. Coming up with a standard set of dimensions is an important part of dimensionalmodeling.
Object Database Models
 In recent years, the object-oriented paradigm has been applied to database technology, creating a newprogramming model known as object databases. These databases attempt to bring the database world andthe application programming world closer together, in particular by ensuring that the database uses thesame type system as the application program. This aims to avoid the overhead (sometimes referred to asthe
impedance mismatch
) of converting information between its representation in the database (forexample as rows in tables) and its representation in the application program (typically as objects). At thesame time, object databases attempt to introduce the key ideas of object programming, such asencapsulation and polymorphism, into the world of databases.A variety of these ways have been tried for storing objects in a database. Some products have approachedthe problem from the application programming end, by making the objects manipulated by the programpersistent. This also typically requires the addition of some kind of query language, since conventionalprogramming languages do not have the ability to find objects based on their information content. Othershave attacked the problem from the database end, by defining an object-oriented data model for the
database, and defining a database programming language that allows full programming capabilities aswell as traditional query facilities.Object databases suffered because of a lack of standardization: although standards were defined byODMG, they were never implemented well enough to ensure interoperability between products.Nevertheless, object databases have been used successfully in many applications: usually specializedapplications such as engineering databases or molecular biology databases rather than mainstreamcommercial data processing. However, object database ideas were picked up by the relational vendors andinfluenced extensions made to these products and indeed to the SQL language.
Post-Relational Database Models
 Several products have been identified as post-relational because the data model incorporates relations butis not constrained by the Information Principle, requiring that all information is represented by data valuesin relations. Products using a post-relational data model typically employ a model that actually pre-datesthe relational model. These might be identified as a directed graph with trees on the nodes.Post-relational databases could be considered a sub-set of object databases as there is no need for object-relational mapping when using a post-relational data model. In spite of many attacks on this class of datamodels, with designations of being hierarchical or legacy, the post-relational database industry continuesto grow as a multi-billion dollar industry, even if the growth stays below the relational database radar.Examples of models that could be classified as post-relational are PICK aka Multivalve, and MUMPS,aka M.
Q: 2. Explain the concept of a Query? How a Query Optimizer works.Ans:
The aim of query processing is to find information in one or more databases and deliver it to the userquickly and efficiently. Traditional techniques work well for databases with standard, single-siterelational structures, but databases containing more complex and diverse types of data demand new queryprocessing and optimization techniques. Most real-
world data is not well structured. Today’s databases
typically contain much non-structured data such as text, images, video, and audio, often distributed acrosscomputer networks. In this complex milieu (typified by the World Wide Web), efficient and accuratequery processing becomes quite challenging. Principles of Database Query Processing for AdvancedApplications teaches the basic concepts and techniques of query processing and optimization for a varietyof data forms and database systems, whether structured or unstructured.
Query Optimizer
Query Optimizer
is the component of a database management system that attempts to determine themost efficient way to execute a query. The optimizer considers the possible query plans (discussed below)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 withthe least cost. Costs are used to estimate the runtime cost of evaluating the query, in terms of the numberof I/O operations required, the CPU requirements, and other factors.
Q: 3. Explain the following with respect to Heuristics of Query Optimizations:A) Equivalence of Expressions B) Selection OperationC) Projection Operation D) Natural Join OperationAns:Heuristics of Query Optimizations
Equivalence of Expressions
 The first step in selecting a query-processing strategy is to find a relational algebra expression that isequivalent to the given query and is efficient to execute.
We’ll use the following relations as examples:
Customer-scheme = (cname, street, ccity)
 Deposit-scheme = (bname, account#, name, balance)
 Branch-scheme = (bname, assets, bcity)
Selection Operation
 1. Consider the query to find the assets and branch-names of all banks who have depositors living in PortChester. In relational algebra, this is
bname, assets
ccity=”Port Chester”
customer deposit branch
))- This expression constructs a huge relation,
customerdeposit branch
of which we are only interested in a few tuples.- We also are only interested in two attributes of this relation.- We can see that we only want tuples for which
ccity = “Port Chester”
.- Thus we can rewrite our query as:
bname, assets
ccity=”Port Chester”
)- This should considerably reduce the size of the intermediate relation.
Projection Operation
 1. Like selection, projection reduces the size of relations.It is advantageous to apply projections early. Consider this form of our example query:2. When we compute the subexpressionwe obtain a relation whose scheme is (
cname, ccity, bname, account#, balance

Activity (9)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
souravgiri1 liked this
AbhijitChandra liked this
devi420 liked this
devi420 liked this
arithforu1 liked this
Pradeep Shukla liked this
Moumita Mondal liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->