assignment (CSE)
assignment (CSE)
1. Which of the following is generally used for performing tasks like creating the structure of the relations, deleting
relation?
a) DML(Data Manipulation Language)
b) Query
c) Relational Schema
d) DDL(Data Definition Language)
2. In the context of file systems, what makes it difficult to access data?
a) Logical level abstraction
b) Need to write a new program to carry out each new task
c) Physical data independence
d) Physical level abstraction
3. Which of the following is a drawback of using file systems to store data?
a) Physical data independence
b) Data redundancy and inconsistency
c) Physical level abstraction
d) Logical level abstraction
4. What problem can arise in file systems related to atomicity of updates?
a) Failures may leave database in an inconsistent state with partial updates carried out
b) Instances and Schemas
c) View of Data
d) Physical Data Independence
5. Which of the following can be used to extract or filter the data & information from the data warehouse?
a. Data redundancy
b. Data recovery tool
c. Data mining
d. Both B and C
6. In which one of the following, the multiple lower entities are grouped (or combined) together to form a single higher-level
entity?
a) Specialization
b) Generalization
c) Aggregation
d) None of the above
7. An on-line commercial site such as Amazon.com is an example of ________ .
10. Which of the following indicates the maximum number of entities that can be involved in a relationship?
a) Minimum cardinality
b) Maximum cardinality
c) ERD
Dr B R Ambedkar National Institute of Technology, Jalandhar
B Tech (Computer Science & Engineering)
CSPC-202, DBMS
Continuous Evaluation, 1st Quiz
Duration: 30 Minutes Max. Marks: 20 Date: 11 March 2024
11. Which type of entity cannot exist in the database unless another type of entity also exists in the database, but does not
require that the identifier of that other entity be included as part of its own identifier?
a) Weak entity
b) Strong entity
c) ID-dependent entity
d) ID- independent entity
17. The traditional storage of data organized by the customer, stored in separate folders in filing cabinets is an example of
______________ type of ‘database’ management system.
a) Primary key
b) Authorised key
c) Encryption key
d) Decryption key
19. Which of the following is not the utility of DBMS?
a) Backup
b) Data Loading
c) Process Organization
d) File organization
20. The top level of the hierarchy consists of ______ each of which can contain _____.
a) Schemas, Catalogs
b) Schemas, Environment
c) Environment, Schemas
d) Catalogs, Schemas
Dr B R Ambedkar National Institute of Technology, Jalandhar
B Tech (Computer Science & Engineering)
CSPC-202, DBMS
Continuous Evaluation, 2nd Quiz
Duration: 30 Minutes Max. Marks: 20 Date: 26.04. 2024
2. Consider Join of a relation R with a relation S. If R has m tuples and S has n tuples, then maximum and minimum sizes of the Join
respectively are:
A. m + n and 0
B. m * n and 0
C. m + n and |m - n|
D. m * n and m + n
5. Which of the following forms the complete set of Relational Algebra operations?
A. Projection, Union, Set difference, and Cross product
B. Selection, Projection, Union, Set difference, and Cross product
C. Selection, Projection, Intersection, Set difference, and Cross product
D. Selection, Union, Set difference, and Cross product
6. Consider the relation schema: Singer(singerName, songName). What is the highest normal form satisfied by the "Singer" relation schema?
A. 1NF
B. 2NF
C. BCNF
D. None of the above
7. A relational database which is in 3NF may still have undesirable data redundancy because there may exist
A. Transitive functional dependencies.
B. Non-trivial functional dependencies involving prime attributes on the right side.
C. Non-trivial functional dependencies involving prime attributes only on the left side.
D. Trivial functional dependencies involving number of attributes.
8. Consider the schema R = (S T U V) and the dependencies S → T, T → U, U → V and V → S. Let R = (R1 and R2). be a decomposition such
that R1 ∩ R2 = ϕ The decomposition is
A. Not in 2NF
B. In 2NF but not in 3NF
C. In 3NF but not in 2NF
D. In both 2NF and 3NF
9. Consider the schema R (A, B, C, D) and the functional dependencies A → B and C → D. If the decomposition is made as R1 (A, B) and R2
(C, D), then which of the following is TRUE?
A. Preserves dependency but cannot perform lossless join.
B. Preserves dependency and performs lossless join.
C. Does not preserve dependency and cannot perform lossless join.
D. Does not preserve dependency but performs lossless join.
10. A relation in which every non-key attribute is fully functionally dependent on the primary key and which has no transitive dependencies is
said to be in:
A. BCNF
B. 2NF
C. 3NF
D. 1NF
11. For a database relation R(a, b, c, d) where the domains of a, b, c, and d include only atomic values, and only the following functional
dependencies and those that can be inferred from them hold: a → c, b → d The relation is in.
A. First normal form but not in second normal form
B. Second normal form but not in third normal form
C. Third normal form BCNF
D. None of the above
12. Given the following two statements: S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB → C, D → E,
E → C is a minimal cover for the set of functional dependencies AB → C, D → E, AB → E, E → C. Which one of the following is
CORRECT?
A. S1 is TRUE and S2 is FALSE
B. Both S1 and S2 are TRUE.
C. S1 is FALSE and S2 is TRUE
D. Both S1 and S2 are FALSE
13. Let the set of functional dependencies F = {QR → S, R → P, S → Q} hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X
is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS). Consider the two statements given below. I. Both Y and Z are in
BCNF II. Decomposition of X into Y and Z is dependency preserving and lossless Which of the above statements is/are correct?
A. Both I and II
B. I only
C. II only
D. Neither I nor II
14. To ensure integrity of the data, a database system should follow the ACID properties. What are these ACID properties?
A. Atomicity, Consistency, Isolation, Durability
B. Accuracy, Consistency, Inclusive, Durability
C. Atomicity, Consistency, Inclusive, Durability
D. None of the above
15. Consider the following schedules involving two transactions. S1: r1(X) ; r1(Y) ; r2(X) ; r2(Y) ; w2(Y) ; w1(X). S2: r1(X) ; r2(X) ; r2(Y) ;
w2(Y) ; r1(Y) ; w1(X) Which one of the following statements is correct with respect to above?
A. Both S1 and S2 are conflict serializable
B. Both S1 and S2 are not conflict serializable
C. S1 is conflict serializable and S2 is not conflict serializable
D. S1 is not conflict serializable and S2 is conflict serializable
17. If transaction T1 reads a change made by transaction T2, then T1 commits only after T2 commits. This property of a transaction schedule is
known as:
A. Strict
B. Serializable
C. Recoverable
D. Cascadeless
18. Which of the following makes the transaction permanent in the database?
A. View
B. Commit
C. Rollback
D. Flashback
19. Two concurrent executing transactions T1 and T2 are allowed to update same stock item say ‘A’ in an uncontrolled manner. In such scenario.
Following problems may occur: (a) Dirty read problem (b) Lost update problem (c) Transaction failure (d) Inconsistent database state
Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two
transactions?
A. (a), (b) and (c) only
B. (c) and (d) only
C. (a) and (b) only
D. (a), (b) and (d) only
20. Consider the following database schedule with two transactions, T1 and T2. S = r2(X); r1 (X); r2(Y); w1(X); r1 (Y); w2(X); a1; a2 where
ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort
by transaction Ti. Which one of the following statements about the above schedule is TRUE?
A. S is non-recoverable
B. S is recoverable, but has a cascading abort
C. S does not have a cascading abort
D. S is strict
Dr B R Ambedkar National Institute of Technology, Jalandhar
B Tech (Computer Science & Engineering)
CSPC-202, DBMS
Continuous Evaluation, 3rd Quiz
Duration: 30 Minutes Max. Marks: 20 Date: 10.05. 2024
2. Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Ti, respectively. Consider the schedule S with four
transactions. S: R4(x)R2(x)R3(x)R1(y)W1(x)W2(x)W3(y)R4(y)
Which one of the following serial schedules is conflict equivalent to S?
A. T1 → T3 → T4 → T2
B. T1 → T4 → T3 → T2
C. T4 → T1 → T3 → T2
D. T3 → T1 → T4 → T2
3. All logs are created and stored in ___ storage when the deferred database method is used, and data is synced to the database when a
transaction commits.
A. Stable
B. Unstable
C. System
D. Recovery
4. If a transaction does not modify the database until it has committed, it is said to use the ___________ technique.
A. Deferred-modification
B. Late-modification
C. Immediate-modification
D. Undo
5. Which of the following fields does the update log record have??
A. Transaction identifier
B. Data-item identifier
C. Old value
D. All of the mentioned indices
6. The ___ is updated immediately after every operation when using the immediate modification technique.
A. Table
B. Row
C. Column
D. Database.
7. The Transaction Ti needs to be reversed if the log consists of record <Tn, Begin>, but does not contain record <Ti, Commit> or <Ti, ____>
A. Begin
B. End
C. Commit
D. Abort
8. State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
A. True.
B. False.
9. In the ___________ scheme, a transaction that wants to update the database first creates a complete copy of the database.
A. Shadow copy
B. Shadow Paging
C. Update log records.
D. All the mentioned
10. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are?
A. Non conflict equivalent
B. Equal
C. Conflict equivalent
D. Isolation equivalent.
11. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock:
A. Can never occur.
B. Must occur.
C. May occur.
D. None of the options
12. State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter.
C. True.
D. False.
13. Which of the following concurrency control protocol ensures both conflict serializability and freedom from deadlock? Statement I: Two
phase locking Statement II: Timestamp ordering choose the most appropriate answer from the options given below:
A. Both Statement I and Statement II are correct
B. Both Statement I and Statement II are incorrect
C. Statement I is correct, but Statement II is incorrect
D. Statement I is incorrect, but Statement II is correct
14. Consider the following schedule for transactions T1, T2 and T3:
Which one of the schedules below is the correct serialization of the above transactions?
A. T1 → T3 → T2
B. T3 → T1 → T2
C. T2 → T1 → T3
D. T3 → T2 → T1
15. In context of two-phase locking protocol, which of the following statements is correct?
A. Growing phase occurs after shrinking phase.
B. In shrinking phase, transaction can obtain as well as release locks but in growing phase, it can only obtain locks.
C. In growing phase, transaction can obtain as well as release locks but in shrinking phase, it can only release locks.
D. In growing phase, transaction can only obtain locks and in shrinking phase, it can only release locks.
16. Consider the following schedules:
Scenario
You are tasked with designing a database for a real-world scenario of your choice. This
could be any system that requires data management, such as an online store, a library
management system, a hospital management system, a social media platform, or any
other scenario you find interesting.
Tasks
- Identify the entities, attributes, and relationships involved in your chosen system.
- Draw an ER diagram to represent this system.
- Clearly mention each relationship's cardinality (one-to-one, one-to-many, many-to-
many) and participation constraints (mandatory, optional).
- Ensure your ERD includes at least four entities, relationships between these entities,
and relevant attributes for each entity.
- Provide a detailed explanation of your ER diagram, including the reasoning behind your
choice of entities, attributes, relationships, cardinality, and participation constraints.
Guidelines:
1. There can be a maximum of 3 students in one group.
2. Marks will be given as per viva.
Dr B R Ambedkar National Institute of Technology, Jalandhar
B Tech (Computer Science & Engineering)
CSPC-202, DBMS
Group Assignment 2
Max. Marks: 5, Submission Date: 30.04.2024
Scenario:
You will now focus on the normalization process using the scenario you selected for the
ERD design assignment. You aim to ensure that the tables derived from your ER diagram
are in at least Third Normal Form (3NF).
Tasks:
- Convert the ER diagram into a set of relational tables.
- Ensure all tables are in at least the Third Normal Form (3NF).
- Indicate the primary, foreign, and other constraints for each table.
- Explain the normalization process for each table. Describe how you ensured each
table meets the requirements of 1NF, 2NF, and 3NF. Identify any functional
dependencies and explain how they were resolved.
Guidelines:
1. There can be a maximum of 3 students in one group.
2. Marks will be given as per viva.