VELAMMAL INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND TECHNOLOGY
Assignment questions
Academic Year 2022-2023
Batch 2020-2024
Year/Semester/Section II/IV
Subject code-Title CS3492-DBMS
Name of the Instructor S.Shanthasheela
Assignment No:1 Total marks:20
Date of Issue:23-02-2023 Date of submission:03-03-2023
S.no Assignment Questions Klevel CO Marks
1 Explain in detail Database System Architecture. Understand CO1 10
Draw an E-R diagram for a library management system
with almost all components and explain.
2 (i) What is Normalization? Explain the need for Understand CO2 10
normalization.
(ii) Discuss First normal form. Second normal form and
third normal with an example.
Assignment No:2 Total marks:20
Date of Issue:28-03-2023 Date of submission:6-04-2023
3 Explain the Two phase Commit and Three-Phase Understand CO3 10
Commit Protocols
4 Construct a B+ tree to insert the following key Apply CO4 10
elements(order of the tree
9,162,7,12,18,1,7,16,19,3,4,6,9,12)
Assignment No:3 Total marks:20
Date of Issue:20-04-2023 Date of submission:29-04-2023
5 Explain in detail database security issues. Understand CO5 10
6 Explain Encryption and Public key encryption Understand CO6 10
infrastructure.
Course in Charge Course Coordinator Module Coordinator HOD/CSE
ASSIGNMENT QUESTIONS
Academic Year 2022-2023
Batch 2019-2023
Year/Semester/Section III/V
Subject code-Title OIT551-DBMS
Name of the Instructor S.Shanthasheela
ASSIGNMENT NO:I
1. Explain in detail Database System Architecture.
2. Draw an E-R diagram for a library management system with almost all components and explain.
ASSIGNMENT NO: II
3. Explain the Two phase Commit and Three-Phase Commit Protocols
In a local database system, for committing a transaction, the transaction manager has to only convey the
decision to commit to the recovery manager. However, in a distributed system, the transaction manager
should convey the decision to commit to all the servers in the various sites where the transaction is being
executed and uniformly enforce the decision. When processing is complete at each site, it reaches the
partially committed transaction state and waits for all other transactions to reach their partially committed
states. When it receives the message that all the sites are ready to commit, it starts to commit. In a
distributed system, either all sites commit or none of them does.
The different distributed commit protocols are −
One-phase commit
Two-phase commit
Three-phase commit
Distributed One-phase Commit
Distributed one-phase commit is the simplest commit protocol. Let us consider that there is a controlling
site and a number of slave sites where the transaction is being executed. The steps in distributed commit
are −
After each slave has locally completed its transaction, it sends a “DONE” message to the
controlling site.
The slaves wait for “Commit” or “Abort” message from the controlling site. This waiting time is
called window of vulnerability.
When the controlling site receives “DONE” message from each slave, it makes a decision to
commit or abort. This is called the commit point. Then, it sends this message to all the slaves.
On receiving this message, a slave either commits or aborts and then sends an acknowledgement
message to the controlling site.
Distributed Two-phase Commit
Distributed two-phase commit reduces the vulnerability of one-phase commit protocols. The steps
performed in the two phases are as follows −
Phase 1: Prepare Phase
After each slave has locally completed its transaction, it sends a “DONE” message to the
controlling site. When the controlling site has received “DONE” message from all slaves, it sends
a “Prepare” message to the slaves.
The slaves vote on whether they still want to commit or not. If a slave wants to commit, it sends a
“Ready” message.
A slave that does not want to commit sends a “Not Ready” message. This may happen when the
slave has conflicting concurrent transactions or there is a timeout.
Phase 2: Commit/Abort Phase
After the controlling site has received “Ready” message from all the slaves −
o The controlling site sends a “Global Commit” message to the slaves.
o The slaves apply the transaction and send a “Commit ACK” message to the controlling
site.
o When the controlling site receives “Commit ACK” message from all the slaves, it
considers the transaction as committed.
After the controlling site has received the first “Not Ready” message from any slave −
o The controlling site sends a “Global Abort” message to the slaves.
o The slaves abort the transaction and send a “Abort ACK” message to the controlling site.
o When the controlling site receives “Abort ACK” message from all the slaves, it considers
the transaction as aborted.
Distributed Three-phase Commit
The steps in distributed three-phase commit are as follows −
Phase 1: Prepare Phase
The steps are same as in distributed two-phase commit.
Phase 2: Prepare to Commit Phase
The controlling site issues an “Enter Prepared State” broadcast message.
The slave sites vote “OK” in response.
Phase 3: Commit / Abort Phase
The steps are same as two-phase commit except that “Commit ACK”/”Abort ACK” message is not
required.
4.Construct a B+ tree to insert the following key elements(order of the tree
9,162,7,12,18,1,7,16,19,3,4,6,9,12)
B+ Tree
B+ Tree is an extension of B Tree which allows efficient insertion, deletion and search operations.
In B Tree, Keys and records both can be stored in the internal as well as leaf nodes. Whereas, in B+ tree,
records (data) can only be stored on the leaf nodes while internal nodes can only store the key values.
The leaf nodes of a B+ tree are linked together in the form of a singly linked lists to make the search
queries more efficient.
B+ Tree are used to store the large amount of data which can not be stored in the main memory. Due to
the fact that, size of main memory is always limited, the internal nodes (keys to access records) of the B+
tree are stored in the main memory whereas, leaf nodes are stored in the secondary memory.
The internal nodes of B+ tree are often called index nodes. A B+ tree of order 3 is shown in the following
figure.
ASSIGNMENT NO:III
5.Explain in detail database security issues.
Types of Security
Database security is a broad area that addresses many issues, including the following:
■ Various legal and ethical issues regarding the right to access certain information— for example, some
information may be deemed to be private and cannot be accessed legally by unauthorized organizations or
persons. In the United States, there are numerous laws governing privacy of information.
■ Policy issues at the governmental, institutional, or corporate level as to what kinds of information
should not be made publicly available—for example, credit ratings and personal medical records.
■ System-related issues such as the system levels at which various security functions should be enforced
—for example, whether a security function should be handled at the physical hardwarelevel, the operating
system level, or the DBMS level.
■ The need in some organizations to identify multiple security levels and to categorize the data and users
based on these classifications—for example, top secret, secret, confidential, and unclassified. The security
policy of the organization with respect to permitting access to various classifications of data must be
enforced.
Threats to Databases. Threats to databases can result in the loss or degradation of some or all of the
following commonly accepted security goals: integrity, availability, and confidentiality.
■ Loss of integrity. Database integrity refers to the requirement that information be protectedfrom
improper modification. Modification of data includes creation, insertion, updating,changing the status of
data, and deletion. Integrity is lost if unauthorized changes are made to thedata by either intentional or
accidental acts. If the loss of system or data integrity is not corrected, continued use of the contaminated
system or corrupted data could result in inaccuracy, fraud, or erroneous decisions.
■ Loss of availability. Database availability refers to making objects available to a human useror a
program to which they have a legitimate right.
■ Loss of confidentiality. Database confidentiality refers to the protection of data from unauthorized
disclosure. The impact of unauthorized disclosure of confidential information can range from violation of
the Data Privacy Act to the jeopardization of national security.Unauthorized, unanticipated, or
unintentional disclosure could result in loss of public confidence,embarrassment, or legal action against
the organization.
6. Explain Encryption and Public key encryption infrastructure.
1. Plaintext. This is the data or readable message that is fed into the algorithm as input.
2. Encryption algorithm. This algorithm performs various transformations on the plaintext.
3. and 4. Public and private keys. These are a pair of keys that have been selected so that if one is used
for encryption, the other is used for decryption. The exact transformations performed by the encryption
algorithm depend on the public or private key that is provided as input. For example, if a message is
encrypted using the public key, it can only be decrypted using the private key.
5. Ciphertext. This is the scrambled message produced as output. It depends on the plaintext and the
key. For a given message, two different keys will produce two different ciphertexts.
6. Decryption algorithm. This algorithm accepts the ciphertext and the matching key and produces the
original plaintext.