UNIT I 2 Marks
UNIT I 2 Marks
RELATIONAL DATABASE :
Purpose of Database System – Views of data – Data Models – Database System Architecture –
Introduction to relational databases – Relational Model – Keys – Relational Algebra – SQL fundamentals
Advanced SQL features – Embedded SQL– Dynamic SQL
PART A
1. What is database?(R)
A database is a basic electronic storage with collection of interrelated data, organized to provide
efficient retrieval. Databases are organized by fields, records and files or tables.
14. What are the different data models? (R) (MAY 2012)
Relational Data Model
The Entity-Relationship Data Model
Object-Based Data Model
Semi structured Data Model
31. What is the use of embedded SQL? (U) (MAY 2012) (NOV 2014)
A fundamental principle underlying embedded SQL, which we call the dual-mode
principle, is that any SQL statement that can be used interactively can also be embedded in an
application program.
32.Write short note on OPEN, FETCH and CLOSE statements. (R)
OPEN:
EXEC SQL OPEN < Cursor name>;
Opens the specified cursor. A set of rows is thus identified and becomes the current active set for
the cursor.
FETCH:
EXEC SQL FETCH <Cursor name>
INTO <host variable reference
commalist>; Advances the specified cursor to the next
row in the active set.
CLOSE:
49. Give the usage of the rename operation with an example.(MAY 2010) (U)
1.LosslessDecomposition
2.DependencyPreservation
3. Lack of Data Redundancy
Key A key is a single or combination of multiple fields. Its purpose is to access or retrieve
• What is the difference between Data Integrity and Data Security? (NOV 2013) (U)
Data integrity and data security are two different aspects that make sure the usability of
data is preserved all the time. Main difference between integrity and security is that integrity deals
with the validity of data, while security deals with protection of data. Backing up, designing
suitable user interfaces and error detection/correction in data are some of the means to preserve
integrity, while authentication/authorization, encryptions and masking are some of the popular
means of data security. Suitable control mechanisms can be used for both security and integrity.
• Which operators are called as unary operators and why are they called so
An operator that takes a single operand in an expression or a statement. The unary operators in
C# are +, -,!, ~, ++, -- and the cast operator.
PART – A
Recovery in a database system means, primarily, recovering the database itself; that is,
restoring the database to a correct state after some failure has rendered the current state
incorrect, or at least suspect.
A commit point corresponds to the end of a logical unit of work, and hence to a point at
which the database is supposed to be in a correct state.
• What are the three problems that any concurrency control mechanism must address? (R)
The three problems are:
Two –phase locking theorem is ―If all transactions obey the two-phase locking
protocol, then all possible interleaved schedules are serializable‖.
Before operating on any object a transaction must acquire a lock on that object.After
releasing a lock, a transaction must never go on to acquire any more locks.
• What is an isolation level? (R)
The isolation level that applies to a given transaction might be defined as the degree of
interference the transaction in question is prepared to tolerate on the part of concurrent
transactions.
• What do you mean by phantom problem? (R)
If transactions operate at less than the maximum isolation level is the so-called
phantom problem
o Mutual Exclusion: At least one resource is held in a non- sharable mode that is
only one process at a time can use the resource. If another process requests that
resource, the requesting process must be delayed until the resource has been
released.
o Hold and Wait: There must exist a process that is holding at least one resource and is
waiting to acquire additional resources that are currently being held by other processes.
o Circular Wait: There must exist a set {p0, p1,................................pn} of waiting processes
such that p0 is waiting for a resource which is held by p1, p1 is waiting for a resource which
is held by p2, pn-1 is waiting for a resource which is held by pn and pn is waiting for a resource
which is held by p0.
• What type of locking needed for insert and delete operations (April/May- 2017)
When you execute an INSERT, UPDATE, or DELETE statement, the database server uses
exclusive locks. An exclusive lock means that no other users can update or delete the item until the
IMPLEMENTATION TECHNIQUES
RAID – File Organization – Organization of Records in Files – Data dictionary Storage – Column
Oriented Storage– Indexing and Hashing –Ordered Indices – B+ tree Index Files – B tree Index
Files – Static Hashing – Dynamic Hashing – Query Processing Overview – Algorithms for
Selection, Sorting and join operations – Query optimization using Heuristics
- Cost Estimation.
PART – A
Cache
Main memory
Flash memory
Magnetic disk
Optical disk
Magnetic tapes
• What is NAS?(R)
Network attached storage (NAS) is an alternative to SAN. NAS is much like SAN, except
that instead of the networked storage appearing to be a large disk, it provides a file system
interface using networked file system protocols such as NFS or CIFS.
• What are the factors to be taken into account in choosing a RAID level?(R)
The factors to be taken into account in choosing a RAID level are
Clustering index is an index whose search key also defines the sequential
order of the file.
• Define hashing.(R)
Hashing allow us to avoid accessing an index structure. It provides a way of constructing
indices.
• Define a bucket.(R)
The term bucket to denote a unit of storage that can store one or more records.
A bucket is typically a disk block, but could be chosen to be a smaller or larger than a
disk
• What is a hash-join?(U)
The hash-join algorithm can be used to implement natural joins and equi-joins.
Searching any data in a B+ tree is very easy because all data are found
in leaf nodes. In a B tree, data cannot be found in leaf nodes.
B+ trees store redundant search key but B tree has no redundant value.
In a B+ tree, leaf nodes data are ordered as a sequential linked list but
in B tree the leaf node cannot be stored using a linked list. Many
database systems' implementations prefer the structural simplicity of
a B+ tree.
• What is a query execution plan?(Apr/May-2017)
Execution plan will be generated by Query optimizer with the help of
statistics and Algebrizer\processor tree.
It is the result of Query optimizer and tells how to do\perform your work\
requirement.
There are two different execution plans - Estimated and Actual.
Estimated execution plan indicates optimizer view.
Actual execution plan indicates what executed the query and how was it done.
• Which cost component are used most often as the basis for cost function? (Apr/May-
2017)
Access cost to secondary storage
Memory usage of cost
• What is replication transparency?(Apr/May-2017)(U)
Distribution Transparency. Distribution transparency is the property of distributed
databases by the virtue of which the internal details of the distribution are hidden from the users.
The DDBMS designer may choose to fragment tables, replicate the fragments and store them at
different sites.
• State the Need for Query Optimization.
Request(source text)
Terminal from which the operation was invoked
User who invoked the operation
Date and time of the operation
Relvar(s), tuples(s),attribute(s) affected
Before images(old values)
After images(new values)
5. What is entity integrity?(U)
No component of the primary key of any base relvar is allowed to
accept nulls are called entity integrity.
28. Write about the four types (Star, Snowflake, Galaxy and Fast
constellation) of Data warehouse schemas.(DEC2015)(R)
1. STAR SCHEMA: Centralized Fact table connect the one or more denormalized data
Applications:
Cross-Marketing
Basket Data Analysis
Catalog design