Database
Q. In a database, what does a 'foreign key' do?
-
A.
Links two tables together
-
B.
Identifies a unique record
-
C.
Stores large amounts of data
-
D.
Indexes a table for faster access
Solution
A foreign key links two tables together by referencing the primary key of another table.
Correct Answer: A — Links two tables together
Q. In a DBMS architecture, what does the term 'data independence' refer to?
-
A.
The ability to change the data structure without affecting the application
-
B.
The ability to access data from multiple sources
-
C.
The ability to store data in different formats
-
D.
The ability to secure data from unauthorized access
Solution
Data independence refers to the ability to change the data structure without affecting the applications that use the data.
Correct Answer: A — The ability to change the data structure without affecting the application
Q. In a distributed database, what is the purpose of data replication?
-
A.
To ensure data consistency across all nodes
-
B.
To reduce the size of the database
-
C.
To increase the complexity of the system
-
D.
To eliminate the need for backups
Solution
Data replication in a distributed database ensures data consistency across all nodes by maintaining copies of the same data in multiple locations.
Correct Answer: A — To ensure data consistency across all nodes
Q. In a multiuser database environment, what is a deadlock?
-
A.
A situation where two transactions are waiting for each other to release locks
-
B.
A method of data encryption
-
C.
A type of database backup
-
D.
A way to optimize queries
Solution
A deadlock occurs when two transactions are waiting for each other to release locks, preventing both from proceeding.
Correct Answer: A — A situation where two transactions are waiting for each other to release locks
Q. In a relational database, what does a foreign key represent?
-
A.
A unique identifier for a table
-
B.
A reference to a primary key in another table
-
C.
An attribute of an entity
-
D.
A constraint on data types
Solution
A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table.
Correct Answer: B — A reference to a primary key in another table
Q. In a relational database, what is a foreign key?
-
A.
A unique identifier for a record
-
B.
A key that links two tables together
-
C.
A key that is not indexed
-
D.
A key used for data encryption
Solution
A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table, establishing a link between them.
Correct Answer: B — A key that links two tables together
Q. In a relational database, what is the purpose of a foreign key?
-
A.
To uniquely identify a record
-
B.
To establish a relationship between two tables
-
C.
To enforce data integrity
-
D.
To improve query performance
Solution
A foreign key is used to establish a relationship between two tables, linking records in one table to records in another.
Correct Answer: B — To establish a relationship between two tables
Q. In a star schema, what do the fact tables contain?
-
A.
Dimension attributes
-
B.
Aggregated data
-
C.
Transactional data
-
D.
Metadata
Solution
Fact tables in a star schema contain transactional data that can be analyzed, often including measures and foreign keys to dimension tables.
Correct Answer: C — Transactional data
Q. In a star schema, what do the fact tables represent?
-
A.
Dimensions of the data
-
B.
Aggregated data
-
C.
Transactional data
-
D.
Metadata
Solution
Fact tables in a star schema represent transactional data, containing measurable, quantitative data for analysis.
Correct Answer: C — Transactional data
Q. In a star schema, what type of table is the central fact table surrounded by?
-
A.
Dimension tables
-
B.
Normalization tables
-
C.
Transaction tables
-
D.
Index tables
Solution
In a star schema, the central fact table is surrounded by dimension tables that provide context to the data.
Correct Answer: A — Dimension tables
Q. In an Entity-Relationship (ER) model, what does a diamond shape represent?
-
A.
Entity
-
B.
Attribute
-
C.
Relationship
-
D.
Weak entity
Solution
In an ER model, a diamond shape represents a relationship between entities.
Correct Answer: C — Relationship
Q. In an ER diagram, how is a multi-valued attribute represented?
-
A.
As a rectangle
-
B.
As an oval
-
C.
As a double oval
-
D.
As a diamond
Solution
A multi-valued attribute is represented as a double oval in an ER diagram.
Correct Answer: C — As a double oval
Q. In an ER diagram, what does a diamond shape represent?
-
A.
Entity
-
B.
Attribute
-
C.
Relationship
-
D.
Weak entity
Solution
In an ER diagram, a diamond shape represents a relationship between entities.
Correct Answer: C — Relationship
Q. In an ER model, how is a one-to-many relationship typically represented?
-
A.
With a single line connecting two entities
-
B.
With a crow's foot notation
-
C.
With a dashed line
-
D.
With a double line
Solution
A one-to-many relationship is typically represented with a crow's foot notation.
Correct Answer: B — With a crow's foot notation
Q. In an ER model, what does a circle represent?
-
A.
An entity
-
B.
An attribute
-
C.
A relationship
-
D.
A weak entity
Solution
A circle in an ER model represents an attribute of an entity.
Correct Answer: B — An attribute
Q. In an ER model, what does a diamond shape represent?
-
A.
Entity
-
B.
Attribute
-
C.
Relationship
-
D.
Weak Entity
Solution
In an ER model, a diamond shape represents a relationship between entities.
Correct Answer: C — Relationship
Q. In an ER model, what does an entity represent?
-
A.
A relationship
-
B.
A table
-
C.
A column
-
D.
A constraint
Solution
In an Entity-Relationship (ER) model, an entity represents a table in the database.
Correct Answer: B — A table
Q. In an ER model, what is an attribute?
-
A.
A relationship between entities
-
B.
A property or characteristic of an entity
-
C.
A unique identifier for an entity
-
D.
A type of database operation
Solution
An attribute is a property or characteristic that describes an entity in an ER model.
Correct Answer: B — A property or characteristic of an entity
Q. In DBMS architecture, what does the term 'physical data independence' refer to?
-
A.
The ability to change the logical schema without changing the physical schema
-
B.
The ability to change the physical storage without affecting the logical schema
-
C.
The ability to access data from multiple sources
-
D.
The ability to enforce security measures
Solution
Physical data independence refers to the ability to change the physical storage of data without affecting the logical schema.
Correct Answer: B — The ability to change the physical storage without affecting the logical schema
Q. In JDBC, which method is used to execute a SQL statement?
-
A.
executeQuery()
-
B.
runQuery()
-
C.
executeSQL()
-
D.
executeStatement()
Solution
In JDBC, the method used to execute a SQL statement is 'executeQuery()'.
Correct Answer: A — executeQuery()
Q. In SQL, which clause is used to filter records after grouping?
-
A.
WHERE
-
B.
HAVING
-
C.
GROUP BY
-
D.
ORDER BY
Solution
The HAVING clause is used to filter records after grouping in SQL.
Correct Answer: B — HAVING
Q. In the context of data warehousing, what does ETL stand for?
-
A.
Extract, Transform, Load
-
B.
Evaluate, Test, Launch
-
C.
Execute, Transfer, Log
-
D.
Extract, Transfer, Load
Solution
ETL stands for Extract, Transform, Load, which is the process of moving data from source systems into a data warehouse.
Correct Answer: A — Extract, Transform, Load
Q. In the context of DBMS architecture, what does 'three-tier architecture' refer to?
-
A.
Data, Application, Presentation
-
B.
Client, Server, Database
-
C.
User, Application, Database
-
D.
Data, Logic, User Interface
Solution
Three-tier architecture in DBMS refers to the separation of data, application logic, and presentation layers into three distinct tiers.
Correct Answer: A — Data, Application, Presentation
Q. In the context of distributed databases, what does the term 'partitioning' refer to?
-
A.
Dividing data into smaller, manageable pieces
-
B.
Combining multiple databases into one
-
C.
Creating backups of the database
-
D.
Encrypting sensitive data
Solution
Partitioning refers to dividing data into smaller, manageable pieces to improve performance and manageability in distributed databases.
Correct Answer: A — Dividing data into smaller, manageable pieces
Q. In the context of ER modeling, what does a 'weak entity' represent?
-
A.
An entity that cannot exist without a strong entity
-
B.
An entity with no attributes
-
C.
An entity that has a composite key
-
D.
An entity that is not related to any other entity
Solution
A weak entity represents an entity that cannot exist without a strong entity, relying on it for its identification.
Correct Answer: A — An entity that cannot exist without a strong entity
Q. In the context of ER modeling, what does an 'entity' represent?
-
A.
A relationship between two tables
-
B.
A unique identifier for a record
-
C.
A real-world object or concept
-
D.
A set of attributes
Solution
An 'entity' represents a real-world object or concept in ER modeling.
Correct Answer: C — A real-world object or concept
Q. What does a primary key do in an ER model?
-
A.
Links two entities
-
B.
Identifies a unique record
-
C.
Defines a relationship type
-
D.
Stores multiple values
Solution
A primary key uniquely identifies a record in a database table.
Correct Answer: B — Identifies a unique record
Q. What does a primary key in an ER model signify?
-
A.
A unique identifier for an entity
-
B.
A foreign key reference
-
C.
An attribute that can be null
-
D.
A relationship type
Solution
A primary key signifies a unique identifier for an entity in an ER model.
Correct Answer: A — A unique identifier for an entity
Q. What does an entity represent in an ER model?
-
A.
A relationship between two tables
-
B.
A real-world object or concept
-
C.
A specific attribute of a table
-
D.
A constraint on data
Solution
An entity represents a real-world object or concept in an ER model.
Correct Answer: B — A real-world object or concept
Q. What does concurrency control in a DBMS ensure?
-
A.
Data redundancy
-
B.
Data integrity during simultaneous access
-
C.
Faster data retrieval
-
D.
Data backup
Solution
Concurrency control ensures data integrity when multiple users access the database simultaneously.
Correct Answer: B — Data integrity during simultaneous access
Showing 1 to 30 of 135 (5 Pages)