0% found this document useful (0 votes)
3 views

assignment (CSE)

The document contains a series of quiz questions related to Database Management Systems (DBMS) for B Tech students at Dr B R Ambedkar National Institute of Technology, Jalandhar. The quizzes cover various topics including data manipulation languages, file systems, relational algebra, normal forms, transaction management, and ACID properties. Each quiz consists of multiple-choice questions designed to assess students' understanding of DBMS concepts.

Uploaded by

atharvg.cs.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

assignment (CSE)

The document contains a series of quiz questions related to Database Management Systems (DBMS) for B Tech students at Dr B R Ambedkar National Institute of Technology, Jalandhar. The quizzes cover various topics including data manipulation languages, file systems, relational algebra, normal forms, transaction management, and ACID properties. Each quiz consists of multiple-choice questions designed to assess students' understanding of DBMS concepts.

Uploaded by

atharvg.cs.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

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

Roll No. __________ Name __________ Section ______

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 ________ .

a) single-user database application


b) multiuser database application
c) e-commerce database application
d) data mining database application
8. The following are functions of a DBMS except ________ .
a) creating and processing forms
b) creating databases
c) processing data
d) administrating databases

9. An Enterprise Resource Planning application is an example of ________ .


a) single-user database application
b) multiuser database application
c) e-commerce database application
d) data mining database application

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

Roll No. __________ Name __________ Section ______

d) Greater Entity Count (GEC)

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

12. In a 1:N relationship, the foreign key is placed in:


a) Either table without specifying parent and child tables.
b) the parent table.
c) the child table.
d) either the parent table or the child table.
13. Which of the following column properties would be used to specify that cells in a column must contain a monetary
value?
a) Null status
b) Data type
c) Default value
d) Data constraints
14. For every relationship, how many possible types of actions are there when enforcing minimum cardinalities?
a) Two
b) Three
c) Four
d) Six
15. The SQL WHERE clause:
a) limits the column data that are returned.
b) limits the row data are returned.
c) Both A and B are correct.
d) Neither A nor B are correct.
16. The command to remove rows from a table 'CUSTOMER' is:
a) REMOVE FROM CUSTOMER ...
b) DROP FROM CUSTOMER ...
c) DELETE FROM CUSTOMER WHERE ...
d) UPDATE FROM CUSTOMER ...

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) Object-oriented database management system


b) Relational database management system
c) Network database management system
d) Hierarchical database management system
18. Which of the following key is required in to handle the data when the encryption is applied to the data so that the
unauthorised user cannot access the data?

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

Roll No. __________ Name __________ Section ______

1. The relational Algebra is a ____________ Query language.


A. Structured
B. Procedural
C. Logical
D. Relational

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

3. ______ operation preserves those tuples that would be lost in____


A. Natural join, outer join
B. Outer join, natural join
C. Left outer join, right outer join
D. Left outer join, natural join

4. The tuple relational calculus is a ___________Query Language.


A. Procedural
B. Non-procedural
C. Object oriented
D. Dynamic

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

16. Two concurrent transactions T1 and T2 are in conflict when?


A. T1 reads from x, T2 reads from x
B. T1 reads from x, T2 writes to x
C. T1 reads from x, T2 writes to y
D. T1 writes to x, T2 writes to y

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

Roll No. __________ Name __________ Section ______

1. The default timestamp ordering protocol generates schedules that are.


A. Recoverable
B. Non-recoverable
C. Starving
D. None of the mentioned

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:

Which of the following is true?


A. Both S1 and S2 are recoverable
B. Neither S1 nor S2 is recoverable
C. S1 is recoverable and S2 is not recoverable.
D. S1 is not recoverable and S2 is recoverable.
17. Checkpoints are types of mechanisms that ___ all previous logs from the system and permanently store them in the storage disk.
A. Partially Remove
B. Remove
C. Partially Add
D. Add
18. Which one of the following problems can occur due to introducing locks in a concurrent transaction scenario?
A. Information overwrite
B. Loss of information
C. Deadlock
D. Lack of integrity
19. Consider the following transactions with data items P and Q initialized to zero:
T1 :read (P); read (Q); if P = 0 then Q := Q + 1 ; write (Q).
T2 : read (Q); read (P); if Q = 0 then P := P + 1 ; write (P).
Any non-serial interleaving of T1 and T2 for concurrent execution leads?
A. a serializable schedule
B. a schedule that is not conflict serializable
C. a conflict serializable schedule
D. a schedule for which a precedence graph cannot be drawn

20. Which of the following statements is/are TRUE?


I. Strict schedule is a cascade-less schedule and recoverable schedule.
II. Every cascade-less schedule is a recoverable schedule.
III. Every conflict serializable schedule is recoverable.?
A. I and II only
B. II and III only
C. I and III only
D. All of the above
Dr B R Ambedkar National Institute of Technology, Jalandhar
B Tech (Computer Science & Engineering)
CSPC-202, DBMS
Group Assignment 1
Max. Marks: 5, Submission Date: 12.03.2024

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.

You might also like