wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Relational Database Design Quiz

Total questions: 73

Worksheet time: 37mins

Name
Class
Date
1.

What components make up the Oracle server technologies?

a)

Oracle database, Oracle WebLogic Server, Oracle Enterprise Manager, and application development tools and languages.

b)

Oracle database and SQL*Plus only.

c)

Oracle WebLogic Server and Java only.

d)

Oracle Enterprise Manager and Cloud Control only.

2.

What is the primary role of the Oracle database within the Oracle product set?

a)

To generate web user interfaces.

b)

To run application servers centrally.

c)

To serve as the repository for data and the engine that manages access to it.

d)

To provide comprehensive administration tools.

3.

In the client-server processing model implemented by the Oracle server, what is the role of the client tier?

a)

To execute SQL commands directly against the database.

b)

To manage the data exclusively.

c)

To generate the user interface and much of the application logic, including SQL commands.

d)

To run all applications centrally on application servers.

4.

Which analogy is often used to describe how computing resources are provided to end users in a cloud environment?

a)

A local area network connection.

b)

Delivery of domestic electricity, supplied on demand without knowing the source.

c)

A client-server split across different geographical locations.

d)

A single, dedicated server managing all IT operations.

5.

What is SQL primarily used for in the context of application development?

a)

Developing complete user interfaces.

b)

Manipulating rows individually with procedural structures.

c)

Data access, but not for developing complete applications.

d)

Writing system-level code like C or Java.

6.

What is critical to understanding SQL and involves modeling business data into a form suitable for storing in relational tables?

a)

Cloud Computing.

b)

Oracle WebLogic Server.

c)

Normalization.

d)

Object-oriented database design.

7.

What problem does unnecessary duplication of data in a database design typically indicate, and what can it lead to?

a)

Efficient data storage, leading to improved performance.

b)

Poor design, leading to wasteful storage and potential integrity errors (anomalies).

c)

Optimal balance between storage and access, ensuring long-term cost savings.

d)

Flexibility in data manipulation, enabling faster retrieval.

8.

What does First Normal Form (1NF) primarily address in relational database design?

a)

Ensuring all columns have unique values.

b)

Eliminating unnecessary repeating groups of data.

c)

Defining links between tables with foreign keys.

d)

Allowing a single car to be bought and sold multiple times.

9.

How does the relational paradigm model data?

a)

As hierarchical structures with parent-child relationships.

b)

As two-dimensional tables consisting of rows and columns.

c)

As object-oriented structures with user-defined types.

d)

As single, unbounded text documents.

10.

Which international bodies manage the SQL standard?

a)

Oracle Corporation and IBM.

b)

Microsoft and PostgreSQL Global Development Group.

c)

ISO and ANSI.

d)

McGraw-Hill Education and Oracle University.

11.

Which of the following are Data Manipulation Language (DML) commands in SQL?

a)

CREATE, ALTER, DROP.

b)

GRANT, REVOKE.

c)

SELECT, INSERT, UPDATE, DELETE, MERGE.

d)

COMMIT, ROLLBACK, SAVEPOINT.

12.

SQL is described as a set-oriented language. What does this imply about its capabilities for application development?

a)

It provides complete solutions including user interface facilities.

b)

It can directly handle flow control, conditional branching, and iteration.

c)

It is purely a data access language and needs to work with a procedural language for application development.

d)

It processes rows one by one through embedded calls.

13.

What is a key difference between SQLPlus and SQL Developer in terms of their interface requirements?

a)

SQLPlus offers more functionality, while SQL Developer is simpler.

b)

SQLPlus requires a graphical terminal, while SQL Developer can be used on character mode devices.

c)

SQL Developer offers more functionality and needs a graphical terminal, whereas SQLPlus can be used on character mode devices.

d)

Both tools require an Oracle WebLogic Server to operate.

14.

In Oracle terminology, what defines a database schema?

a)

A person who can log on to the database.

b)

All the objects in the database owned by one user.

c)

A construct that makes an object accessible to other users without requiring its schema name.

d)

A predefined set of tables like HR or OE.

15.

If an object (e.g., a table) does not exist in a user's own schema, how must it be accessed?

a)

It is impossible to access the object.

b)

The object name must be qualified with the name of the schema in which it resides (e.g., HR.EMPLOYEES).

c)

A CREATE SCHEMA command must be run first.

d)

Only the database administrator can access it.

16.

In the HR schema's REGIONS table, which column is identified as the primary key?

a)

region_name.

b)

country_id.

c)

region_id.

d)

location_id.

17.

What is the primary purpose of the HR and OE demonstration schemas provided by Oracle?

a)

To enforce strict security protocols in production databases.

b)

To store example data for illustrating the use of SQL and advanced Oracle development facilities.

c)

To replace actual business application data.

d)

To benchmark database performance without actual user data.

18.

What is the fundamental effect of a SQL SELECT statement on data stored in the database?

a)

It always alters information, ensuring data modification.

b)

It provides a read-only method of extracting information and never alters the data.

c)

It can insert, update, or delete data depending on the clauses used.

d)

It permanently removes duplicate records from tables.

19.

Which three concepts from relational theory encompass the capabilities of the SELECT statement?

a)

Inserting, Updating, Deleting.

b)

Projection, Selection, Joining.

c)

Defining, Altering, Dropping.

d)

Committing, Rolling back, Saving.

20.

What are the two mandatory clauses of a basic SELECT statement syntax?

a)

SELECT and WHERE.

b)

SELECT and ORDER BY.

c)

SELECT and FROM.

d)

FROM and WHERE.

21.

What is the primary function of the DISTINCT keyword in a SELECT statement?

a)

To sort the results in ascending order.

b)

To eliminate duplicate values from the results set.

c)

To count all rows, including duplicates.

d)

To project only specific columns.

22.

Why should caution be exercised when executing a statement like SELECT * FROM huge_table;?

a)

It might accidentally delete all data.

b)

It always returns an error if the table is too large.

c)

It may cause performance issues if the table contains millions of rows of data.

d)

It automatically converts all data types, which can lead to inconsistencies.

23.

In the Oracle data dictionary, how is metadata about different database objects typically stored by default?

a)

In lowercase.

b)

In mixed case, preserving original input.

c)

In uppercase.

d)

In a binary format, without case sensitivity.

24.

How is a NULL value formally defined in SQL?

a)

As the number zero.

b)

As a blank space.

c)

As a value that is unavailable, unassigned, unknown, or inapplicable.

d)

As an empty string.

25.

What is the result when performing arithmetic operations with a NULL value?

a)

The operation returns zero.

b)

The operation ignores the NULL and proceeds with other values.

c)

The arithmetic operation always yields a NULL result.

d)

The operation results in an error.

26.

What is the primary function of the WHERE clause in a SELECT statement?

a)

To sort the rows retrieved by a query.

b)

To limit or restrict the rows returned based on one or more conditions.

c)

To define new columns in the result set.

d)

To combine results from multiple queries.

27.

When specifying character or date literals in a WHERE clause, what are they delimited by?

a)

Double quotation marks ("").

b)

Parentheses ().

c)

Single quotation marks ('').

d)

Square brackets [].

28.

Which two wildcard characters are used with the LIKE operator for pattern matching?

a)

* (asterisk) and ? (question mark).

b)

% (percentage symbol) and _ (underscore character).

c)

# (hash) and @ (at symbol).

d)

! (exclamation mark) and & (ampersand).

29.

Which operator is used to test column values for equality to NULL?

a)

= (is equal to).

b)

IS NULL.

c)

IN (NULL).

d)

NOT NULL.

30.

In a WHERE clause, if Condition X is TRUE and Condition Y is NULL, what is the result of Condition X AND Condition Y?

a)

TRUE.

b)

FALSE.

c)

NULL.

d)

Error.

31.

In a WHERE clause, if Condition X is FALSE and Condition Y is NULL, what is the result of Condition X OR Condition Y?

a)

TRUE.

b)

FALSE.

c)

NULL.

d)

Error.

32.

How does the ORDER BY clause affect the rows returned by a SELECT statement?

a)

It changes the specific records that are selected from the table.

b)

It influences the records returned by a query by filtering them.

c)

It only affects the presentation (ordering) of the results, not the specific rows returned.

d)

It restricts the number of rows to a maximum limit.

33.

When sorting data using the ORDER BY clause, how can rows with NULL values in the sorting column be positioned?

a)

They are always listed first by default.

b)

They are always listed last by default.

c)

They can be explicitly listed first (NULLS FIRST) or last (NULLS LAST).

d)

NULL values cause an error when sorting.

34.

What is the purpose of ampersand substitution variables in SQL?

a)

To permanently replace a value in the database.

b)

To allow user input to restrict and sort output at runtime.

c)

To define new data types for columns.

d)

To combine multiple queries into a single result set.

35.

What is a function defined as in SQL?

a)

A program that can accept input parameters and always returns multiple values.

b)

A program that is explicitly written to alter data in tables.

c)

A program written to optionally accept input parameters, perform an operation, and return a single value.

d)

A set of SQL commands used to create database objects.

36.

What is the key difference between single-row functions and multiple-row (group) functions?

a)

Single-row functions always return numeric values, while multiple-row functions return characters.

b)

Single-row functions execute once for each row selected, while multiple-row functions execute once for the entire set of rows queried.

c)

Single-row functions can only be used in SELECT statements, while multiple-row functions can be used in WHERE clauses.

d)

Single-row functions cannot accept input parameters, but multiple-row functions can.

37.

What does the INITCAP function do?

a)

Converts a string of characters to all lowercase.

b)

Converts a string of characters to all uppercase.

c)

Accepts a string of characters and returns each word in title case (first letter capitalized).

d)

Extracts the initial characters of a string.

38.

If a column FIRST_NAME contains 'JOHN', what will LOWER(FIRST_NAME) return?

a)

'John'.

b)

'JOHN'.

c)

'john'.

d)

Error.

39.

What does the LENGTH function return?

a)

The number of bytes in a character string.

b)

The number of characters in a character string.

c)

The length of a numeric expression in bytes.

d)

Whether a string contains any null values.

40.

Which operator can be used as an alternative to the CONCAT function for joining character strings?

a)

+ (addition operator).

b)

|| (double pipe symbol).

c)

* (multiplication operator).

d)

- (subtraction operator).

41.

What does the MONTHS_BETWEEN function compute?

a)

The number of days between two dates.

b)

The number of years between two dates.

c)

The number of months between two given date parameters.

d)

The current month of the year.

42.

What value does the SYSDATE function typically return?

a)

The last day of the current month.

b)

The system date and time when the function is executed.

c)

The number of months since the database was installed.

d)

The start date of the current transaction.

43.

What is implicit data type conversion?

a)

Converting data types using explicit functions like TO_CHAR or TO_NUMBER.

b)

When the Oracle server automatically converts data from one data type to another to complete an operation.

c)

Manually changing a column's data type using ALTER TABLE.

d)

Defining a column with a flexible data type that accepts various input types.

44.

What is the main purpose of the NVL function?

a)

To check if a value is unique.

b)

To convert a non-NULL value to NULL.

c)

To replace a NULL value with a specified alternative value.

d)

To concatenate two strings.

45.

What kind of logic do CASE expressions provide in SQL queries?

a)

Looping and iteration.

b)

If-then-else conditional logic.

c)

Data aggregation for groups.

d)

Joining multiple tables based on conditions.

46.

Which other conditional function provides similar if-then-else logic to DECODE?

a)

NVL.

b)

COALESCE.

c)

CASE.

d)

NULLIF.

47.

What would TO_CHAR(123.56, '999.9') return in Oracle SQL?

a)

'123.5'.

b)

'123.6'.

c)

'123.56'.

d)

An error, as the format mask is shorter than the number.

48.

What are group functions also known as?

a)

Single-row functions.

b)

Scalar functions.

c)

Summary or aggregate functions.

d)

Conversion functions.

49.

When AVG(COMMISSION_PCT) is calculated, what values are considered?

a)

All values, treating NULL as zero.

b)

Only the non-null values.

c)

Only the distinct non-null values.

d)

It always returns NULL if any NULL exists.

50.

What does COUNT(*) return?

a)

The number of rows with non-null values in a specific column.

b)

The number of unique rows in a table or group.

c)

The number of rows in the group, including those with NULL values in any column.

d)

The sum of all numeric values in a column.

51.

Can multiple group functions be used in the same SELECT list?

a)

No, only one group function is allowed per SELECT statement.

b)

Yes, but only if they operate on the same column.

c)

Yes, multiple group functions may be used in the same SELECT list.

d)

Only if a HAVING clause is also present.

52.

What type of parameter does the SUM function expect?

a)

Any data type, as long as it can be implicitly converted.

b)

A single character parameter.

c)

One numeric parameter.

d)

A date parameter.

53.

What is the primary function of the HAVING clause?

a)

To restrict individual rows before grouping.

b)

To define the columns that will be displayed in the output.

c)

To limit or restrict group-level rows based on conditions.

d)

To sort the aggregated results.

54.

Under what condition can a HAVING clause be specified?

a)

Only if a WHERE clause is also present.

b)

Only when a GROUP BY clause is present.

c)

It can always be specified, regardless of other clauses.

d)

Only if a SELECT DISTINCT statement is used.

55.

Which of the three pillars of relational theory does the chapter 'Displaying Data from Multiple Tables' primarily focus on?

a)

Selection.

b)

Projection.

c)

Joining.

d)

Aggregation.

56.

If a source table has 3 rows and a target table has 4 rows, how many rows will a cross join (Cartesian product) between them result in?

a)

3 rows.

b)

4 rows.

c)

12 rows.

d)

7 rows.

57.

How does the NATURAL JOIN clause identify join columns between two tables?

a)

It requires explicit specification of join columns in an ON clause.

b)

It automatically joins based on all columns with shared names between the two tables.

c)

It joins tables based on primary key-foreign key relationships only.

d)

It creates a Cartesian product by default.

58.

Which three keywords are mutually exclusive in the context of the same join clause?

a)

SELECT, FROM, WHERE.

b)

NATURAL, USING, ON.

c)

LEFT, RIGHT, FULL.

d)

AND, OR, NOT.

59.

When joining N tables, what is the minimum number of join conditions required to avoid an accidental Cartesian join?

a)

N.

b)

N + 1.

c)

N - 1.

d)

No specific number, it depends on the data.

60.

When using the JOIN...USING clause, how should the join columns be specified?

a)

In an ON clause with fully qualified names.

b)

As a comma-separated list within parentheses after the USING keyword, with unqualified column references.

c)

Automatically by the database, without explicit naming.

d)

As a subquery that returns the matching column names.

61.

What is a subquery?

a)

A stand-alone SELECT statement that always returns a single value.

b)

A SELECT statement whose output is used as input to another SELECT, INSERT, UPDATE, or DELETE statement, or another subquery.

c)

A query that combines results from multiple independent SELECT statements.

d)

A statement used exclusively in the FROM clause to create temporary tables.

62.

What are the distinguishing characteristics of a scalar subquery?

a)

It returns a set of rows and multiple columns.

b)

It returns exactly one value: a single row with a single column.

c)

It references columns in the parent query, making its result dependent on the parent.

d)

It can only be used in the FROM clause.

63.

When a subquery is used in the SELECT list (projection), what is a mandatory requirement for that subquery?

a)

It must return multiple rows.

b)

It must be correlated.

c)

It must be scalar.

d)

It must reference a table from the FROM clause.

64.

What is a general rule regarding the use of NOT IN with subqueries, particularly concerning NULL values?

a)

NOT IN is always reliable, even with NULL values.

b)

NOT IN should be avoided if there's a chance the subquery result set might include a NULL, as it can lead to problems.

c)

NOT IN implicitly converts NULL to zero, making it safe.

d)

NOT IN can only be used with scalar subqueries, thus avoiding NULL issues.

65.

Which of the following comparison operators are valid for multiple-row subqueries?

a)

=, >, >=.

b)

IN, NOT IN, ANY, ALL.

c)

<, <=, <>.

d)

IS NULL, IS NOT NULL.

66.

What is a characteristic execution method of a correlated subquery?

a)

It is evaluated once before the parent query runs.

b)

It only returns a single value, independent of the parent query.

c)

It references columns in the parent query and is potentially executed repeatedly for each row processed by the parent.

d)

It is an efficient construct that should always be preferred.

67.

What does the UNION set operator do?

a)

Returns all rows from two queries, including duplicates, without sorting.

b)

Returns only the rows common to both queries.

c)

Returns the combined rows from two queries, sorting them and removing duplicates.

d)

Returns rows from the first

68.

What is the purpose of the GROUP BY clause in SQL?

a)

To join multiple tables together.

b)

To filter records based on specific conditions.

c)

To aggregate data across multiple rows based on one or more columns.

d)

To sort the results of a query in ascending or descending order.

69.

Which SQL function is used to retrieve the highest value from a set of values?

a)

AVG.

b)

MAX.

c)

MIN.

d)

SUM.

70.

What does the DISTINCT keyword do in a SQL query?

a)

It combines multiple rows into a single row.

b)

It sorts the result set in a specific order.

c)

It removes duplicate rows from the result set.

d)

It limits the number of rows returned.

71.

What is the purpose of the GROUP BY clause in a SQL query?

a)

To filter records based on specific conditions.

b)

To aggregate data across multiple rows based on one or more columns.

c)

To sort the results in descending order.

d)

To join multiple tables together.

72.

Which SQL statement is used to remove a table from a database?

a)

DELETE TABLE table_name;

b)

DROP TABLE table_name;

c)

REMOVE TABLE table_name;

d)

ALTER TABLE table_name DROP;

73.

What does the COALESCE function do in SQL?

a)

It concatenates two or more strings together.

b)

It returns the first non-null value in a list of arguments.

c)

It counts the number of non-null values in a column.

d)

It converts a string to uppercase.