Download CUSTOMER_CODE SMUDE DIVISION_CODE SMUDE

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Concurrency control wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

SQL wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Functional Database Model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database wikipedia , lookup

Versant Object Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
CUSTOMER_CODE
SMUDE
DIVISION_CODE
SMUDE
EVENT_CODE
APR2016
ASSESSMENT_CODE MCA3020_APR2016
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
18252
QUESTION_TEXT
Discuss Lorel Query Language. Differentiate between XML Oriented
Databases and Native XML Databases.
SCHEME OF
EVALUATION
Lorel Query Language:Lorel is considered as an early query language
used for semi structured data. Lorel language makes use of the OEM
(Object Exchange Model) as the data model for semi structured data.
Lorel is utilized to expandOQL (Object Query Language) for the
procedure of querying elements. This is done by depending on coercion
at various levels to hold back the powerful typing of OQL. Lorel is also
used to extend OQL with path expressions. This is done in order that
user can state the patterns that are corresponding to actual paths in
referred data.(4 marks)
One of the advantages of Lorel language is its easy syntax which makes
users to understand it more clearly. The drawback of Lorel language is
that it is dependent on OQL parser. Also it comprises of limited
functionalities. (2 marks)
Differences between XML Oriented Databases and Native XML
Databases: XML-oriented databases are typically relational and enclose
model or pattern driven extensions for transporting data to and from
XML documents and are usually intended for data-centric documents.
Following are the differences between XML Oriented Databases and
Native XML Databases:
1.A native XML database is used to maintain physical structure. An
XML-oriented database can do so also, but practice shows a diverse
story.
2.Native XML database can accumulate data without schema. We could
make use of techniques to recognize structure in unprocessed documents
to be accumulated in XML-oriented systems. These types of techniques
are relatively limited.
3.XPath, DOM, or comparable XML-associates APIs are required to
access data in native XML systems. Alternatively, XML-oriented
systems provide direct access to the data via open-standard APIs, like
open database connectivity (ODBC).
(4 marks)
QUESTION_T
DESCRIPTIVE_QUESTION
YPE
QUESTION_ID 73630
QUESTION_T
Discuss any five SQL features in detail.
EXT
5 features - >2 marks each. Any 5 features among those mentioned below
may be written
SCHEME OF
EVALUATION
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
125269
QUESTION_TEXT
What is denormalization? Explain its techniques.
Definition – 2 marks
each
SCHEME OF
EVALUATION
4 techniques – 2 marks
Denormalization is the process of converting higher normal norms to
lower normal forms with the objective of getting faster access to
database.
(a) Duplicate data – method of adding duplicate data into relational
table. This will minimize the number of joins required to execute a given
query. It also minimizes the CPU and I/O resources being utilized as
well as boosts up the performance
(b) Summary data – records are summarized in some summary
columns thereby reducing the number of records stored in a table. This
enhances database performance as now the database server needs to
process lesser records for a given query execution
(c) Horizontal partitioning – table is split by rows thereby reducing the
number of records paer table and hence drives the performance
(d) Vertical fragmentation – breaks relations by columns. It makes
more than 2 tables by allocating the original key to all and allocating a
few of the non key columns to every newly made identical keyed table
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
125271
QUESTION_TEXT
Differentiate between BCNF and 3 NF.
Comparison of BCNF and 3NF
We have seen BCNF and 3NF.
It is always possible to obtain a 3NF design without sacrificing losslessjoin or dependency-preservation.
SCHEME OF
EVALUATION
If we do not eliminate all transitive dependencies, we may need to use
null values to represent some of the meaningful relationships.
Repetition of information occurs.
These problems can be illustrated with Banker-schema.
As banker-name bname , we may want to express relationships
between a banker and his or her branch.
Figure : An instance of Banker-schema.
Figure shows how we must either have a corresponding value for
customer name, or include a null.
Repetition of information also occurs.
Every occurrence of the banker's name must be accompanied by the
branch name.
If we must choose between BCNF and dependency preservation, it is
generally better to opt for 3NF.
If we cannot check for dependency preservation efficiently, we either
pay a high price in system performance or risk the integrity of the data.
The limited amount of redundancy in 3NF is then a lesser evil.
To summarize, our goal for a relational database design is
BCNF.
Lossless-join.
Dependency-preservation.
If we cannot achieve this, we accept
3NF
Lossless-join.
Dependency-preservation.
A final point: there is a price to pay for decomposition. When we
decompose a relation, we have to use natural joins or Cartesian products
to put the pieces back together. This takes computational time.
QUESTION_TYPE DESCRIPTIVE_QUESTION
QUESTION_ID
125272
QUESTION_TEXT What is an external sort algorithm? Explain with an example.
A sort can be classified as being internal if the records that it is sorting are
in main memory, or external if some of the records that it is sorting in
auxiliary storage.
External Sorting:
When the size of file to be sorted is bigger than that of available
memory. External sorting algorithms are more device dependent
than internal sorting. External Merge Sort is a relatively common used
algorithm, based on the internal sorting and external merging principle. In
general, this strategy is called Divide and Conquer :
1. Divide the data into parts that are as small as possible
2. After applying the sorting algorithm on those parts, remerge them
SCHEME OF
EVALUATION
Those already sorted portions of data are called runs. For the working
process, initial runs must be created. According to this strategy, all data is
to be split into several smaller parts that fit to main memory completely:
Assuming we have to sort n records of equal length stored in a file. The
system’s main memory can hold exactly p records with p << n. So the
source file is divided into [n / p] parts. After sorting all of them they
represent the initial runs. At the end, for retrieving the complete sorted set,
those parts need to be
merged.
4marks
External Sorting Algorithm carries out the operation in following 2 phases
:
Sorting Phase
Merging Phase
Sorting Phase:
In this phase, the runs are read into the main memory. Over there the runs
are sorted by using internal sorting algorithm and the result is written back
to the disk as temporary sorted runs. The number of initial runs and the
size of a run are governed by the number of file blocks and available
buffer space.
For Instance:
If nB = 5 blocks
b = 1024 blocks
Then, nR =[(b/ nB ) =205 intial runs each of size 5 blocks
Merging Phase
In this phase, merging of the sorted runs is carried out over one or more
phase. The number of runs that can be merged together in each pass is
termed as the degree of merging.
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
125275
QUESTION_TEXT
Discuss Semantic Query Optimization. What are the various Execution
Strategies for SQL Sub Queries?
Semantic Query Execution: Semantic Query Execution is a technique to
modify one query into another query by using the relational database
constraints. These constraints may be unique attributes or much more
complex constraints. This technique is used for the efficient execution of
the query.
(1 mark)
Consider the example below:
Select E.LNAME, M.LNAME
SCHEME OF
EVALUATION
FROM EMPLOYEE AS E, EMPLOYEE AS M
WHERE E.SUPERNO=M.ENO AND E.SALARY>M.SALARY
marks)
(2
This query retrieves the names of employees who earn more than their
supervisors. If a constraint is applied on the database schema to check
that none of the employee can earn more than his reporting supervisor;
the semantic query optimizer checks for this constraint and may not
execute the query if it knows that the resultant query will be empty. If
the constraint check is done efficiently then this approach can save a lot
of time.
(2 marks)
Execution Strategies for SQL Sub Queries: Different physical execution
strategies are employed by query optimizer for the various logical query
plan options. Two types of strategies are there for sub query execution:
1.
Navigational Strategies
2.
Set-Oriented Processing
(1 mark)
1.
Navigational Strategies: For executing sub-query, navigational
strategies depends on the nested loops joins. Basically there are two
classes of navigational strategies: forward lookup and reverse lookup.
Forward lookup firstly starts executing the outer query and when outer
rows are generated then it invokes the sub-query. Reverse lookup starts
with the sub-query and processes one sub-query row at a
time.
(2 marks)
2.
Set-Oriented Processing: Set-Oriented Processing finally needs that
the query could be effectively de-correlated. If this is the situation, set
operations for example hash, merge and join can execute the
query.
(2 marks)