Apache Derby, an Apache DB subproject, is an open source relational database implemented entirely in Java and available under the Apache License, Version 2.0.
Apache Derby MCQs: This section contains multiple-choice questions and answers on the various topics of Apache Derby. Practice these MCQs to test and enhance your skills on Apache Derby.
List of Apache Derby MCQs
1. Apache Derby is written in ____ programming language?
- Java
- C
- C++
- Python
Answer: A) Java
Explanation:
Apache Derby is written in Java programming language.
2. Apache Derby is ____?
- Non-relational database management system
- Relational database management system
Answer: B) Relational database management system
Explanation:
Apache Derby is relational database management system.
3. Is Apache Derby open-source?
- Yes
- No
Answer: A) Yes
Explanation:
Apache Derby is open-source.
4. Apache Derby is developed by ____?
- Microsoft
- Apache
Answer: D) Apache
Explanation:
Apache Derby is developed by Apache software foundations.
5. Is Apache Derby platform independent?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Apache Derby platform independent.
6. Indexes for datatypes such as BLOB and LONGVARCHAR are supported by Derby? Yes or No?
- Yes
- No
Answer: B) No
Explanation:
Indexes for datatypes such as BLOB and LONGVARCHAR are not supported by derby.
7. Apache Derby follows the concept of ____?
- Separation
- Aggregation
- conglomerate
Answer: C) conglomerate
Explanation:
Apache Derby follows the concept of conglomerate.
8. How many modes are there to deploy Apache Derby?
- 5
- 4
- 3
- 2
Answer: D) 2
Explanation:
Apache Derby may be deployed in two modes: embedded mode and server mode.
9. When Derby is deployed in ____ mode, the database engine runs in the same JVM as the Java application?
- Embedded
- Server
Answer: A) Embedded
Explanation:
When Derby is deployed in embedded mode, the database engine runs in the same JVM as the Java application.
10. Which of the following tools provides information about the Java and Derby environments?
- Sysinfo
- Ij
- Dblook
Answer: A) Sysinfo
Explanation:
sysinfo tool provides information about the Java and Derby environments.
11. You may use ____ tool to run Apache Derby scripts and queries?
- Sysinfo
- Ij
- Dblook
- Jar
Answer: B) Ij
Explanation:
You may use ij tool to run Apache Derby scripts and queries.
12. To produce Data Definition Language ____ tool is utilised?
- Sysinfo
- Ij
- Dblook
- Jar
Answer: C) Dblook
Explanation:
To produce Data Definition Language, Dblook tool is utilised.
13. Which of the following command Create a database in Apache Derby?
- NEW DATABASE
- CREATE DATABASE
- CREATE DB
- NEW DB
Answer: B) CREATE DATABASE
Explanation:
CREATE DATABASE command helps us to create a database in Apache Derby.
14. Which of the following command helps us to create a table in Apache Derby?
- CREATE NEW TABLE
- NEW TABLE
- CREATE TABLE
Answer: C) CREATE TABLE
Explanation:
CREATE TABLE command helps us to create a table in Apache Derby.
15. To obtain data from a table, use the ____ command.
- SELECT
- GET
- USE
Answer: A) SELECT
Explanation:
To obtain data from a table, use the SELECT command.
16. In Apache Derby, a ____ is a logical container that holds a collection of database objects including tables, views, indexes, and procedures?
- Table
- View
- Schema
Answer: C) Schema
Explanation:
In Apache Derby, a schema is a logical container that holds a collection of database objects including tables, views, indexes, and procedures.
17. In Apache Derby, a ____ is a fundamental database object that contains a collection of rows and columns reflecting a specific set of data?
- Table
- View
- Schema
Answer: A) Table
Explanation:
In Apache Derby, a table is a fundamental database object that contains a collection of rows and columns reflecting a specific set of data.
18. Apache Derby provides how many types of updates?
- 5
- 4
- 3
- 2
Answer: D) 2
Explanation:
Apache Derby supports two sorts of updates (syntax) namely searched update and positioned update.
19. Apache Derby provides how many types of delete?
- 5
- 4
- 3
- 2
Answer: D) 2
Explanation:
Apache Derby supports two sorts of Delete namely searched delete and positioned delete.
20. The ____ delete statement deletes all of the columns given in a table?
- Searched
- Positioned
Answer: A) Searched
Explanation:
The searched delete statement deletes all of the columns given in a table.
21. The GROUP BY clause is used with ____ statements?
- WHERE
- SELECT
- ORDER BY
Answer: B) SELECT
Explanation:
The GROUP BY clause is used with SELECT statements.
22. A table ____ is nothing more than a reference to its data.
- Index
- Data
- ID
- Key
Answer: A) Index
Explanation:
A table index is nothing more than a reference to its data.
23. ____ indexes are used for data integration in Apache Derby?
- Primary
- Composite
- Unique
Answer: C) Unique
Explanation:
UNIQUE indexes are used for data integration in Apache Derby.
24. A ____ index is a single index that is created on two rows?
- Composite
- Equity
- Primary
- Unique
Answer: A) Composite
Explanation:
A Composite index is a single index that is created on two rows.
25. Which of the following statement is used to create a procedure in Apache Derby?
- NEW PROCEDURE
- CREATE PROCEDURE
- CREATE NEW PROCEDURE
Answer: B) CREATE PROCEDURE
Explanation:
CREATE PROCEDURE statement is used to create a procedure in Apache Derby.
26. ____ are statements or code that are performed whenever an event occurs in a database.
- Triggers
- Events
- Hooks
Answer: A) Triggers
Explanation:
Triggers are statements or code that are performed whenever an event occurs in a database.
27. Which of the following create a trigger in Derby?
- CREATE NEW TRIGGER
- TRIGGER
- CREATE_TRIGGER
- CREATE TRIGGER
Answer: D) CREATE TRIGGER
Explanation:
CREATE TRIGGER statement creates a trigger in Derby.
28. Which of the following statement helps us to drop the view in Apache derby?
- DELETE VIEW
- DROP VIEW
- DELETE VIEW_NAME
Answer: B) DROP VIEW
Explanation:
DROP VIEW statement is used to drop the view in the Apache Derby.
29. ____ are rules that are applied to data in a table to guarantee data integrity and compliance with particular standards?
- Constraints
- Limitations
- Restrictions
Answer: A) Constraints
Explanation:
Constraints are rules that are applied to data in a table to guarantee data integrity and compliance with particular standards.
30. ____ are virtual tables that are defined by SQL queries?
- Table
- Database
- Columns
- Schemas
- Views
Answer: E) Views
Explanation:
Views are virtual tables that are defined by SQL queries.
31. A ____ key is a column or combination of columns in a database that relates to another table’s primary key?
- Primary key
- Foreign Key
- Composite Key
Answer: B) Foreign Key
Explanation:
A foreign key is a column or combination of columns in a database that relates to another table’s primary key.
32. Is Derby completely ACID-compliant?
- Yes
- No
Answer: A) Yes
Explanation:
Derby is completely ACID-compliant, which means it supports Atomic, Consistent, Isolated, and Durable transactions.
33. Derby support which of the following?
- Single-user environment
- Multi-user environment
- Both
- None
Answer: C) Both
Explanation:
Derby supports both single-user and multi-user environments.
34. In Apache Derby, a ____ is a point inside a transaction that allows you to roll back only a portion of the transaction.
- Savepoint
- Extraction point
- Transaction pause
Answer: A) Savepoint
Explanation:
In Apache Derby, a savepoint is a point inside a transaction that allows you to roll back only a portion of the transaction.
35. A ____ object is used to run a dynamic SQL query with parameters.
- PreparedStatement
- Statement
Answer: A) PreparedStatement
Explanation:
A PreparedStatement object is used to run a dynamic SQL query with parameters.
36. A ____ object is used to run a static SQL statement with no input parameters.
- PreparedStatement
- Statement
Answer: B) Statement
Explanation:
A Statement object is used to run a static SQL statement with no input parameters.
37. Derby will only accept connections from the ____ by default.
- Localhost
- Any host
Answer: A) Localhost
Explanation:
Derby will only accept connections from the localhost by default.
38. To connect to the network server using Java code, the ____ file must be on your classpath.
- derbyhost.jar
- derbyserver.jar
- derbyjava.jar
- derbyclient.jar
Answer: D) derbyclient.jar
Explanation:
To connect to the network server using Java code, the derbyclient.jar file must be on your classpath.
39. Which of the following companies are using Apache derby?
- IBM
- Sun microsystem
- Eclipse foundation
Answer: C) Eclipse foundation
Explanation:
Following companies are using apache derby:
- IBM
- Sun microsystem
- Eclipse foundation
40. The derby server will be listening on port ____ by default?
- 3000
- 3010
- 1527
- 8000
Answer: D) 8000
Explanation:
The derby server will be listening on port 1527 by default.