Free Back-End Development MCQ Questions and Answers — Questions and Answers
Question 1: A component of SQL used to access, and add the total number of records in a table can be obtained using an integrated aggregate function (will NOT ignore null values in columns) and remove data from databases.
- DDL (Data Definition Language)
- DCL (data Control Language)
- DML (Data Manipulation Language) (Correct answer)
Correct answer: DML (Data Manipulation Language)
Explanation: <br> DML (Data Manipulation Language) is a part of SQL that is used to query, insert, update, and remove data from a database. Examples of DML statements include SELECT (to query data), INSERT (to add new data), UPDATE (to modify existing data), and DELETE (to remove data).
Question 2: The total number of records in a table can be obtained using an integrated aggregate function (will NOT ignore null values in columns).
- Min()
- Count(*) (Correct answer)
- Max()
- Avg()
Correct answer: Count(*)
Explanation: <br> COUNT(*) is a built-in aggregate function in SQL that is used to return the total number of records in a table, including null values in the columns. The asterisk (*) is used to indicate that you want to count all the rows in the table.
Question 3: A broad view of a database showing all its tables and connections.
- Many-to-many
- Schema (Correct answer)
- Insert
- Derived Column
Correct answer: Schema
Explanation: <br> In database management systems, a schema is an overall view that represents the tables and relationships of an entire database. It provides a logical structure for organizing and displaying data in a database. A schema can be thought of as a blueprint or a plan for the database.
Question 4: Contains two ID values and, if available, other details.
- Linking Table (Correct answer)
- Set
- Delete
- Lookup Table
Correct answer: Linking Table
Explanation: <br> A linking table is a table in a relational database that contains two ID values from different tables and optionally additional information.
Question 5: A set of data spanning all rows in a table with the same datatype (records)
- Statement
- Column (Correct answer)
- Row
- Combination Key
Correct answer: Column
Explanation: <br> In a relational database, a column represents a set of data having the same data type in a table, spanning all rows or records. Each column in a table has a unique name and a specific data type, such as integer, string, date, etc.
Question 6: An integrated function that changes a given value in the result set to a null.
- Distinct
- Count()
- Coalesce
- NullIf (Correct answer)
Correct answer: NullIf
Explanation: <br> The built-in function used to convert a specified value to null in the result set is NULLIF(). This function takes two arguments and returns null if the two arguments are equal; otherwise, it returns the first argument.
Question 7: A word or phrase used to specify which columns should be returned by a query
- Insert
- Select (Correct answer)
- Set
- Delete
Correct answer: Select
Explanation: <br> The SELECT keyword is used in SQL to specify which columns to retrieve in a query. It is followed by a comma-separated list of column names or expressions that define the data to be retrieved.
A component of SQL used to access, and add the total number of records in a table can be obtained using an integrated aggregate function (will NOT ignore null values in columns) and remove data from databases.