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

Entity–attribute–value model wikipedia , lookup

Global serializability wikipedia , lookup

Oracle Database wikipedia , lookup

Open Database Connectivity wikipedia , lookup

IMDb wikipedia , lookup

Ingres (database) wikipedia , lookup

Commitment ordering wikipedia , lookup

Functional Database Model wikipedia , lookup

Relational model wikipedia , lookup

Database wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Versant Object Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Serializability wikipedia , lookup

ContactPoint wikipedia , lookup

Concurrency control wikipedia , lookup

Transcript
CUSTOMER_CODE
SMUDE
DIVISION_CODE
SMUDE
EVENT_CODE
APR2016
ASSESSMENT_CODE MI0034_APR2016
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
204985
QUESTION_TEXT
a. Describe how to place records on the disk.
b. What are the various operations that can be done on files? Explain the
two different types of records.
a.
The different types of record types are
Fixed length records and variable length records, most of the file may have
variable length records for various reasons such as recording having variable
length fields, having repeating fields, having optional fields, record blocking
and spanned versus un–spanned records.
Allocating file blocks on Disks:
File headers contains information about a file that is needed by the header
and includes information to determine the disk addresses of the file blocks as
well as to record format descriptions.
5 marks
SCHEME OF
EVALUATION
b. Operations are insertion, deletion and modification. The commands
used are Find, read, find next, delete, modify and insert
There are two types of records: files of unordered records and files of ordered
records.
Searching algorithm for sequential and unordered files, they are sequential
search, binary search, hashing technique.
In hashing technique, key value to convert to hash function that provides fast
access to records. The basic terminologies associated with hashing techniques
are Hash table, Hash function and Hash key.
5 marks
(Total 10 Marks)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
204987
QUESTION_TEXT
Describe the transaction processing concepts.
A transaction is an atomic unit comprising one or more SQL
statements. A transaction begins with the first executable statement and
ends when it is committed or rolled back.
Single user versus multiuser systems – A DBMS is used if at most one
user can use the system at a time. It is multiuser if many users can use
the system and have access to the database concurrently.
A transaction is a logical unit of database processing that includes one
or more database access operations (insertion, delete, etc). Only
retrieval of data is called read–only transaction.
The basic database access operations are as follows:
1.
Read–item (x)  It reads a database item named “x” into a
program variable.
SCHEME OF
EVALUATION
2.
Write–item (x)  It writes the value of the program variable x
into the database.
•
Concurrent control – The data in the database must perform their
transactions concurrently without violating the ACID (Atomicity,
Consistency, Integrity and Durability) properties of a database.
•
Need for concurrency control – In a multiuser database,
transactions submitted by the various users may execute concurrently
and update the same data.
•
Data concurrency – Access to data concurrently (simultaneously)
used by many users must be coordinates.
•
Data consistency – A user always sees a consistent (accurate) view
of all data committed by other transactions as of that time and all
changes made by the user up to that time.
The types of problems we may encounter when these two transactions
run concurrently.
1.
2.
3.
The lost update problem –
Dirty read problem
Incorrect summary problem
10 marks
(Total 10 Marks)
QUESTION_T
DESCRIPTIVE_QUESTION
YPE
QUESTION_I
D
204988
QUESTION_T Explain the overview of distributed database management system, and also
EXT
make a comparison with centralized database systems.
As a general goal, distributed computing systems divide a big, unmanageable
problem into smaller pieces and solve it efficiently in a coordinated manner
Functions of distributed databases
SCHEME OF
Basic functions performed by DDBMS in addition to those of centralised
EVALUATION
DBMS are Distributed query processing, Data tracing, Distributed transaction
management , Distributed database recovery , Security, Distributed directory
(catalogue) management
(5 marks)
Differences between distributed database and centralised database (5
marks)
(Total 10 Marks)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
204990
QUESTION_TEXT
SCHEME OF
EVALUATION
Describe the locking techniques for concurrency control.
Several types of locks are used in concurrency control to introduce locking
concepts gradually. Some of the locks are binary locks, which are simple but
restrictive and therefore not used in practice, shared locks and exclusive locks,
which provide more general locking capabilities and are used in practical
database locking schemes. Two–phase locking protocol and Strict two–phase
locking are the techniques used. Deadlock and starvation– In deadlock state,
there exists a set of transactions in which every transaction in the set is
waiting for another transaction in the set.
10 marks
(Total 10 Marks)
QUESTION_TYP
DESCRIPTIVE_QUESTION
E
QUESTION_ID
207754
The ABC Company needs a database to track employee information. When
an employee is hired, they are assigned to a particular department. Each
employee is assigned an employee ID and a manager. The HR department
also needs to track the employee’s name, date of birth and hire date.
Department information, such as department code, name and budget code
should also be tracked. A department will have many employees, but an
employee can be assigned to only one department.
Here, we have two entities EMPLOYEE and DEPARTMENTS and the
attributes emp_ID, Manager_ID, Father’s_name_Address, DOB,
Date_of_joining are assigned to EMPLOYEE entity and the attributes
dept_code, dept_name, budget_code are assigned to entity
DEPARTMENT. The relationship of the employee details is shown in the
figure below.
QUESTION_TEX
T
Recursive Relation
a.
What are the important elements of E-R Model? Identify the
different elements pertaining to above scenario.
b.
What kind of relationship does Employee share with Department?
c.
Which is the foreign key for the table Employee in the above
scenario and why?
There are three important elements of ER Model. They are Entity, entity
sets, relationships and attributes
In the above scenario, Employee and Department are the entities.
Attributes are emp_ID, Manager_ID, Father’s_name_Address, DOB,
Date_of_joining for Employee and Dept_code, dept_name, budget_code
for Department. Relationships are Department will have many emplyees,
an employee belongs to only one department.
SCHEME OF
EVALUATION
5 Marks
Employee share one to one relationship with Department
2 marks
Dept_code is the foreign key for EMPLOYEE as it is the primary key for
DEPARTMENT
3 marks
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
207757
QUESTION_TEXT
Elucidate the difference between deferred update and immediate update
with an example of a transaction and show the result of both the
examples.
SCHEME OF
EVALUATION
Deferred update defers or postpones any actual updates to the database
until the transaction completes its execution successfully and reaches its
commit point.
Example,
For example, consider a transaction t1 that transfers Rs. 50 from account
A to account B.
This is defined as follows:
T0: read (A)
log database
T0: read (A)
<T0 START>
A: = A − 50
<t0.A.950>
Write (A)
<T0.B.2050>
Read (B)
<T0.commit>
Write (B)
A = 950
B = 2050
Let t1 be a transaction that withdraws Rs.100 from account C, defined as
T1:read©
C:C − 100
Write(C)
C = 100
<T1.SAR>
<T1.c.60>
<T1.commit>
C = 600
Before execution, consider that the values for A, B and C were Rs.
1,000, Rs. 2,000 and Rs. 700, respectively.
Now, let us assume that a system crash occurs just after the step write
(C) of transaction T1, that is, the log at the time of the crash
<T0.START>
<T0.A.950>
<T0.B.2050>
<T0.commit>
<T1.START>
<T1.C.600>
Immediate update updates the database without waiting to reach the
commit point, that is, when a transaction issues an update command, the
database can be updated immediately.
Example,
'Here is an example of an Immediate update in which the actual updates
take place in both the database and the log as a result of execution of
T0 and T1.'Lot
Database
<T0 START>
<T0.S.1000.950>
<T0.B.2000.2050>
A = 950
B = 2,050
<T0 CP, OT?>
<t1.START>
<T1.C.700.600>
C = 600
<T1 COMMIT>
(10 Marks)