Dbms 2 Marks
Dbms 2 Marks
Dbms 2 Marks
Redundancy is controlled
Data isolation
Data integrity
Security Problems.
5. Define Data independence.
The ability to modify a schema definition in only level without affecting a
Schema definition in the next higher level is called data independence.
6. Define Data Models and list the types of Data Model.
Underlying the structure of database is the data mode: a collection of conceptual
tools for describing data, data relationships, data semantics and consistency constraints.
The various data model that have been proposed fall in to three different groups: Objectbased logical model, record-based logical model and physical model.
7. What is E-R model?
The entity-relationship data model is based on perception of a real world that
consists of a collection of basic objects, called entities and of relationships among these
object
8. Define entity and entity set.
A entity is a thing or object in the real world that is distinguisgble from other
objects. For example ,each person in an entity. The set of all entities of the same type are
termed and entity set.
9. What is Weak entity set?
An entity set may not have sufficient attributes to form a primary key, and its
primary key compromises of its partial key and primary key of its parent entity, the its is
said to be Weak Entity set.
10. Define relationship and relationship set.
A relation ship is an association among several entities. For example, a depositor
relationship associated a customer with each account. The set of all relationships of the
same type are termed a relationship set.
11.What is object Oriented Model?
The model is based on collection of object. An objects contains values stored in
instance variables with in the object. An object also contains bodies of code that operate
on the object. These bodies of code are called methods. Objects that contain same type of
values and the same methods are grouped together into classless
12. Define Record-Based Logical Models.
Record-based logical models are used in describing data at the logical and levels.
They are used both to specify the overall structure of the database and provide a highlevel description of the implementation.
13. Define Relational model.
The relational model uses a collection of tables to represent both data and the
relationships among those data. Each table has multiple columns, and each columns has a
unique name.
14. Define Network model.
Data in the networks model are represented by collection of records and
relationships among data are represented by links, which can be viewed as pointers. The
records in the database are organized as collections of arbitrary graphs.
15. Define Hierarchical Model
The hierarchical model is similar to the network models in the sense that data and
relationship among data are represented by records and links respectively. It differ from
the network model in that the records are organized as collection of trees rather that
arbitrary graphs.
16. List the role of DBA.
The person who has central control over the system is called database
administrator. The function of the DBA include the following:
Schema definition
Schema and physical-organization modification
Integrity-constraint specification
17. List the different type of database system user.
There are four different type of database-system users, differentiated by the way
they expect to interact with the system.
Application programmers
Sophisticated Users
Specialized users
Nave users.
18. Write about the role of Transaction manager.
Tm is responsible for ensuring that the database remains in a consistent state
despite system failures. The TM also ensures hat concurrent transaction executions
proceed without conflicting.
19. Write about role of storage manager.
A SM is a program module that provides the interface between the low-level data
stored in the database and the application programs and queries submitted to the system.
The SM is responsible for interaction with the data stored on disk.
20. Define attributes.
Entities are described in a database by a set of attributes. For example, the
attributes account-number and balance describe one particular account in a bank.
21. Define mapping constraints.
An E-R enterprise schema may define certain constraints to which the contents of
a database must conform. Two of the most important types of constrains are mapping
cardinalities: express the number of entities to which another entity can be associated via
relationship set.
22. Define Relational algebra.
A general expression in the relational algebra is construct out of smaller sub
expression.
23. Define Relational calculus.
A tuple relational calculus expression is of the form {t/P(t)} where P is a formula.
Several tuple variable may appear in a formula.
24. List possible operation s in Relation algebra
Select, project, theta join, eqijoin, union, intersection, difference, Cartesian
product, division.
25.Is it possible for several attributes to have the same domain? Illustrate your
answer with suitable example.
Average: avg
Minimums: min
Maximum : max
Total: sum
Count: count
Minimizing redundancy
1. Lossless join
2. Dependency preservation
3. No repletion of information
11. What is query?
A query with respect to DBMS relates to user commands that are used to interact
with a database. The query language can be classified into data definition language and
data manipulation language.
12. What do you mean by Correlated subquery?
Subqueries, or nested queries, are used to bring back a set of rows to be used by
the parent query. Depending on how the subquery is written, it can be executed once for
the parent query of it can be executed once for each row returned by the parent query. If
the subquery is executed for each row of the parent, this is called correlated subquery.
13. .Define SQL and state the difference between SQL and other conventional
programming Language.
SQL is a nonprocedural language that is designed specifically for data access
operations on normalized relational database structures. The primary difference between
SQL and other conventional programming languages is that SQL statements Specify
what data operations should be performed rather than how to perform them.
14. What is database trigger is a PL/SQL block that can defined to automatically
execute for insert, update and deleted statements against a table .The trigger can be
defied to execute once for the entire statement or once for every row that is
inserted,updated,or deleted. For any one table, there are twelve events for which you can
define database triggers.
15. What are Armstrong rules?
Reflexive rule:
If Y is subset or equal to X the X->Y
Augmentation rule:
If X->Y then XZ->YZ.
Transitive Rule:
If {x->Y,Y->z} then X->Z
The above three are known as Armstrong Rule
16. What are the privileges that can be granted on a table by a user to others?
Insert, Update, delete, select, references, index, execute, alter, all
17. What is the difference between TRUNCATE and DELETE command?1
TRUNCATE is a DDL command whereas DELECTE is a DML command. Hence
DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back.
WHERE clause can be used with DELETE and not with TRUNCATE.
18. What is the use of CASCADE CONSTRAINTS?
When this clause is used with the DROP command, a parent table can be dropped
even when a child table exists.
19. Is it possible for several attributes to have the same domain? Illustrate you
answer with suitable examples.
Possibility for several attributes to have same domain. Yes, several attributes to
have same domain. For example
Attributes:name, address, belong to same domains contains all text string of certain
length.
10. List out the field level constraints that can be associated with relational table.
Unique, Check, Not null, primary key, foreign key
11. Justify the need for normalization.
Need for normalization-To avoid insertion, deletion and updating anomalies. To
ensure that there is no redundant data. To ascertain that the database design is perfect.
12. Name the different type of joins supported in SQL.
Equi join, Natural join, self join, and outer join.
UNIT-3
1. Define 1NF?
A relation schema R is in 1NF if the domains of all attributes of R are atomic
2. Define 2 NF?
A relation schema R is in 2NF if every non prime attribute A in R is fully
functionally dependent on the primary key of R.
3. Define 3NF?
A relation schema R is in third normal form if, whenever a nontrivial functional
dependency X -> A holds in R, either (a) X is super key of R or (b) A is a prime attribute
of R.
4. What is BCNF?
A relation schema R is in BCNF if it is in 3NF and satisfies additional constraints
that for every FE X->A, X must be a candidate key.
5. Define Boycott Method?
6. Define a partially Dependency?
UNIT IV
1. What is transaction?
A transaction is collection of operations that form logical unit of work .A
database system must ensure proper execution of transaction despite failures either the
entire transaction executes or none of it does.
2. Define atomicity?
Either all operations of the transaction are reflected properly in the database or
none are.
3. Define Durability?
A transaction completes successfully then changes it has made to the database
persist even if there are system failure.
4. What is transaction-management component?
Ensuring atomicity is the responsibility of the database system itself specifically,
it is handled by a component called the transaction-management component.
5. List the properties of traction.
1. Atomicity 2. consistency 3. Isolation 4. Durability.
6. Define concurrency control?
Serializability of schedules generated by concurrently executing transactions can
be ensure through one of a variety of mechanisms called concurrency control.
7. What are the tow operation access data in transaction?
Read(x)- transfer data item x from database.
Write(x)- transfer data item x from the local buffer.
8. What do you mean by read only transaction?
The data base operation in a transaction do not update the database but only
retrieve data, the transaction is called a read-only transaction.
9. What are the steps followed in Executing read(x) command in transaction?
1. Find the address of the disk block that contains item x.
2. Copy that disk block in to a buffer in main memory.
3. Copy item x from the buffer to the program variable named x.
10. What are the steps followed in executing write(x) command in transaction?
1. find the address of disk block that contain item x.
2. Copy that disk block into buffer in main memory.
3. Copy item x from the program variable named x into its correct location
in the buffer
4. Store the update block from the buffer back to disk.
2) System crash
3) Disk failure
3) Garbage collection
UNIT V
1. Explain Optical Storage Device?
The most popular form of optical storage is the compact disk read-only memory, can be
read by a laser. Optical storage is the write-once, read-many disk, which allows data to be
written once, but does not allow them to be erased and rewritten.
2. Define cache.
The cache is the fastest and most costly form of storage. Cache memory is small; its use
is managed by the operating system.
3. Define disk controller?
It is an interface between the computer system and the actual hardware of the disk drive.
Accept high-level command to read or wire a sector. It attaches checksums to each sector
that is written. It also performs remapping of bad sectors.
4. Define RAID.
It is collectively called redundant arrays of inexpensive disk, have been proposed to
address the performance and reliability issues. RAID are used for their higher reliability
and higher data transfer rate. RAID stands of independent, instead of inexpensive.
5. Define file organization.
A file is organized logically as a sequence of records. These records are mapped on to
disk blocks. File are prided as a basic construct in operating system.
6.
10.
11.
12.
16.
18.
19.
geek1
geeksquiz1
1001
geek2
geeksquiz2
1002
geek3
geeksquiz3
StudentCourse Table
CourseID EnrollNo
1
1000
1000
1000
1002
1003
Following is join query that shows names of students enrolled in different courseIDs.
geek1
geek2
geek1
geek3
geek1
What is Identity?
Ans: Identity (or AutoNumber) is a column that automatically generates numeric values. A start and
increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers;
the value of this cannot be controlled. Identity/GUID columns do not need to be indexed.
What is a view in SQL? How to create one
Ans: A view is a virtual table based on the result-set of an SQL statement. We can create using create
view syntax.