0% found this document useful (0 votes)
7 views11 pages

Adv Database MCQS

The document contains a series of questions and answers related to database concepts, including normalization, UML diagrams, transactions, deadlocks, and SQL commands. Key topics covered include the importance of eliminating data anomalies, the structure of UML class diagrams, and the properties of transactions such as ACID. Additionally, it discusses various database design phases and the role of triggers and stored procedures.

Uploaded by

hsweb91
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)
7 views11 pages

Adv Database MCQS

The document contains a series of questions and answers related to database concepts, including normalization, UML diagrams, transactions, deadlocks, and SQL commands. Key topics covered include the importance of eliminating data anomalies, the structure of UML class diagrams, and the properties of transactions such as ACID. Additionally, it discusses various database design phases and the role of triggers and stored procedures.

Uploaded by

hsweb91
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/ 11

Normalization in databases primarily aims to:

A) Increase redundancy
B) Eliminate data anomalies
C) Improve query speed
D) Reduce storage costs
E) None
Answer: B

First Normal Form (1NF) ensures that:


A) All non-key attributes are fully dependent
B) There are no partial dependencies
C) All attributes contain atomic values
D) There are no transitive dependencies
E) None
Answer: C

Specialization in an EER diagram refers to:


A) The process of defining subclasses
B) Combining multiple entities into one
C) Defining relationships between entities
D) Creating weak entities
E) None
Answer: A

Generalization is the process of:


A) Grouping multiple entities into a superclass
B) Dividing an entity into subclasses
C) Defining primary keys
D) Converting weak entities into strong ones
E) None
Answer: A

Disjoint constraint on a specialization means:


A) An entity can belong to multiple subclasses
B) An entity can belong to only one subclass
C) All subclasses must participate in a relationship
D) Subclasses are merged into one entity
E) None
Answer: B

A relationship with its own attributes in an EER diagram is called a:


A) Recursive relationship
B) Weak relationship
C) Multivalued relationship
D) Ternary relationship
E) None
Answer: D

UML Class Diagrams are primarily used to:


A) Model interactions between objects
B) Represent the structure of a system
C) Show the flow of control
D) Model dynamic behavior
E) None
Answer: B

The attributes of a class in a UML class diagram are:


A) Represented in the top section
B) Represented in the middle section
C) Represented in the bottom section
D) Represented outside the class box
E) None
Answer: B

A dashed line with an open arrowhead in a UML class diagram typically represents:
A) Association
B) Dependency
C) Aggregation
D) Generalization
E) None
Answer: B
A solid line without arrows connecting two classes in a UML class diagram typically
represents:
A) Generalization
B) Dependency
C) Association
D) Realization
E) None
Answer: C

Use cases in a UML use case diagram represent:


A) The structural parts of the system
B) The operations the system can perform
C) The relationships between objects
D) The roles within the system
E) None
Answer: B

The "extend" relationship in a UML use case diagram represents:


A) A use case that can extend the behavior of another use case
B) A use case that inherits another use case
C) A dependency between two use cases
D) A relationship between actors
E) None
Answer: A

Actors in UML use case diagrams are connected to use cases using:
A) Solid lines with arrows
B) Solid lines without arrows
C) Dashed lines with arrows
D) Solid lines with filled arrows
E) None
Answer: B

The first step in the database design process is:


A) Logical design
B) Physical design
C) Requirements analysis
D) Data modeling
E) Implementation
Answer: C
In the conceptual design phase, the main focus is on:
A) Implementing database schema
B) Designing tables
C) Identifying user requirements
D) Creating a high-level data model
E) Optimizing queries
Answer: D

Which of the following activities is performed in the requirements analysis phase?


A) Analyzing existing systems
B) Creating ER diagrams
C) Defining the physical storage structure
D) Normalization
E) None
Answer: A

The final stage in the database development lifecycle is:


A) Conceptual design
B) Logical design
C) Physical design
D) Maintenance
E) Testing
Answer: D

During the logical design phase, the designer typically:


A) Decides on the specific DBMS to use
B) Defines tables, fields, and relationships
C) Sets up indexes and partitions
D) Models user interaction
E) None
Answer: B

Indexes are typically created during which phase?


A) Conceptual design
B) Logical design
C) Physical design
D) Maintenance
E) Requirements analysis
Answer: C

In database design, referential integrity ensures that:


A) All data is unique
B) Foreign key values must match primary key values
C) No null values are allowed
D) Data is stored efficiently
E) None
Answer: B

Backups and recovery plans for databases are usually designed during which phase?
A) Conceptual design
B) Logical design
C) Physical design
D) Maintenance
E) None
Answer: C

A view is created with the create view statement.


A) CREATE VIEW view_name AS SELECT column1, column2, ... FROM table_name
WHERE condition;
B) CREATE VIEW AS view_name SELECT column1, column2, ... FROM table_name
WHERE condition;
C) CREATE VIEW view_name AS SELECT column1, column2, ... FROM table_name;
D) CREATE VIEW view_name AS SELECT column1, column2, ... WHERE condition FROM
table_name
E) CREATE VIEW SELECT column1, column2, ... FROM table_name WHERE condition;
Answer: A

In the maintenance phase, database administrators typically:


A) Design new tables
B) Implement data backups
C) Create conceptual models
D) Analyze user requirements
E) None
Answer: B
Cardinality in the context of database design refers to:
A) The number of entities in a system
B) The number of relationships a table can have
C) The number of rows in a table
D) The uniqueness of records
E) None
Answer: B

A transaction in a database is defined as:


A) A collection of SQL queries
B) A single operation
C) A sequence of operations that perform a logical unit of work
D) An SQL statement
E) None
Answer: C

The ACID properties of a transaction are:


A) Atomicity, Consistency, Isolation, Durability
B) Availability, Consistency, Integrity, Durability
C) Accuracy, Consistency, Isolation, Dependability
D) Atomicity, Concurrency, Isolation, Durability
E) None
Answer: A

The isolation property of a transaction ensures that:


A) Transactions run independently from each other
B) All changes made by a transaction are permanent
C) Transactions can see each other’s intermediate results
D) Data is always consistent
E) None
Answer: A

Which SQL command is used to commit a transaction?


A) SAVE
B) ROLLBACK
C) COMMIT
D) CONFIRM
E) None
Answer: C

A dirty read occurs when:


A) One transaction reads uncommitted data from another transaction
B) Transactions overwrite each other’s data
C) A transaction fails and data is lost
D) Two transactions read the same data
E) None
Answer: A

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON . TO


'ahmed'@'localhost';
A) It means grant permissions to all tables of all databases
B) It means grant permissions to all columns of all tables
C) It means grant permissions to all rows of tables
D) It means grant permissions to all users of one database
E) It means grant permissions to all tables of recently created databases
Answer: A

Which of the following is NOT a necessary condition for deadlock to occur?


A) Mutual exclusion
B) Hold and wait
C) Preemption
D) Circular wait
E) None
Answer: C

The circular wait condition implies that:


A) A process can acquire all needed resources
B) Processes form a circular chain, each waiting for a resource held by another process
C) No process is waiting
D) Resources are always available
E) None
Answer: B
One way to prevent hold and wait in deadlock prevention is to:
A) Allow processes to hold all resources
B) Allocate all resources to a process before execution starts
C) Force processes to release resources
D) Allow circular waiting
E) None
Answer: B

Starvation is different from deadlock because:


A) Starvation can happen even if no cycle exists in the resource graph
B) Deadlock can be resolved automatically
C) Starvation affects only one process
D) Starvation happens when resources are available
E) None
Answer: A

A common deadlock avoidance technique is:


A) Limiting the number of processes
B) Dynamically checking resource allocation to prevent unsafe states
C) Allowing circular waits
D) Holding resources permanently
E) None
Answer: B

A clustered index:
A) Physically rearranges the table data
B) Is always unique
C) Does not affect physical data order
D) Allows duplicate values
E) None
Answer: A

The primary difference between a stored procedure and a function is:


A) A procedure can return a value, while a function cannot
B) A function must return a value, while a procedure may not
C) Procedures can be called in SELECT statements
D) Procedures are faster than functions
E) None
Answer: B

A stored procedure is typically used for:


A) Storing data
B) Improving data storage
C) Encapsulating business logic
D) Query optimization
E) None
Answer: C

Which of the following is NOT an advantage of using indexes?


A) Improves the speed of SELECT queries
B) Increases the speed of INSERT and UPDATE operations
C) Helps ensure data uniqueness
D) Allows faster access to rows
E) None
Answer: B

A primary key constraint automatically creates:


A) A clustered index
B) A non-clustered index
C) A unique constraint
D) A composite index
E) None
Answer: A

A trigger in a database is similar to a stored procedure, but it:


A) Is executed in response to events
B) Is manually called
C) Can return a value
D) Is always related to indexing
E) None
Answer: A
A functional dependency (FD) is defined as:
A) A relationship where one attribute uniquely determines another
B) An attribute that depends on multiple keys
C) A relationship that does not affect normalization
D) A dependency that is always transitive
E) None
Answer: A

Which of the following is a true statement regarding functional and transitive


dependencies?
A) All functional dependencies are transitive
B) Transitive dependencies are a type of functional dependency
C) Functional dependencies are always transitive
D) Only primary keys can have transitive dependencies
E) None
Answer: B

Triggers can be fired in response to which of the following events?


A) INSERT
B) UPDATE
C) DELETE
D) All of the above
E) None
Answer: D

What is a common use case for a trigger?


A) To create new tables
B) To enforce referential integrity
C) To fetch data from multiple tables
D) To manage user permissions
E) None
Answer: B

Which SQL command is used to remove a trigger?


A) REMOVE TRIGGER
B) DROP TRIGGER
C) DELETE TRIGGER
D) ALTER TRIGGER
E) None
Answer: B

PL/SQL executes as a:
A) Single statement
B) Whole block
C) Two statements at a time
D) As per programmer's instruction
E) None
Answer: B

How to call variable value in PL/SQL:


A) dbms_output.put_line(var1);
B) dbms.output_put_line(var1);
C) dbms_output_put_line(var1);
D) dbms_out(Var1);
E) None
Answer: A

Which command is used to change the record of a tuple?


A) Delete
B) Change
C) Insert
D) Update
E) None
Answer: D

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy