CCNA Itf Database Fundamentals Questions

54 questions · Itf Database Fundamentals topic · All types, answers revealed

1
MCQeasy

Which of the following is a characteristic of a relational database table?

A.Rows represent records and columns represent fields
B.Rows represent fields and columns represent records
C.Each table must have a composite key
D.Tables are stored in a hierarchical structure
AnswerA

Correct definition.

Why this answer

In a relational database, each row represents a single record (tuple) and each column represents an attribute (field).

2
MCQhard

A database has a table 'Orders' with columns OrderID (primary key), CustomerID, OrderDate, and TotalAmount. Which SQL statement will delete all orders placed before January 1, 2023?

A.DROP FROM Orders WHERE OrderDate < '2023-01-01'
B.DELETE FROM Orders WHERE OrderDate < '2023-01-01'
C.DELETE OrderDate < '2023-01-01' FROM Orders
D.REMOVE FROM Orders WHERE OrderDate < '2023-01-01'
AnswerB

Correct; deletes rows with OrderDate before the specified date.

Why this answer

DELETE FROM table WHERE condition removes rows that satisfy the condition.

3
MCQmedium

Which DBMS is an example of a proprietary relational database system?

A.MySQL
B.PostgreSQL
C.SQLite
D.Oracle Database
AnswerD

Oracle is a proprietary commercial RDBMS.

Why this answer

Oracle Database is proprietary (commercial). MySQL, PostgreSQL, and SQLite are open-source.

4
MCQmedium

Which of the following SQL statements will add a new row to the 'Products' table?

A.UPDATE Products SET name='Widget', price=10.99
B.INSERT INTO Products VALUES ('Widget', 10.99)
C.CREATE ROW IN Products ('Widget', 10.99)
D.ADD INTO Products VALUES ('Widget', 10.99)
AnswerB

Correct syntax for inserting a new row.

Why this answer

INSERT INTO table VALUES (value1, value2, ...) adds a new row.

5
MCQmedium

A sales database has a Customers table with CustomerID as the primary key and an Orders table that includes CustomerID. Which type of relationship is typically established between Customers and Orders?

A.One-to-one
B.Many-to-many
C.Unrelated
D.One-to-many
AnswerD

Correct; one customer can have many orders.

Why this answer

A customer can have multiple orders, but each order belongs to one customer, so it's a one-to-many relationship.

6
MCQmedium

Which of the following best describes normalization in a relational database?

A.Encrypting sensitive data in the database
B.Removing duplicate data from a table
C.Increasing the number of tables to improve performance
D.Combining all data into a single table
AnswerB

Correct; normalization reduces data redundancy.

Why this answer

Normalization is the process of organizing data to reduce redundancy and improve data integrity.

7
MCQmedium

In a relational database, which constraint ensures that a foreign key value matches an existing primary key value in the referenced table?

A.Foreign key constraint
B.Primary key constraint
C.Check constraint
D.Unique constraint
AnswerA

Correct; foreign key enforces referential integrity.

Why this answer

Referential integrity is enforced by foreign key constraints, ensuring that relationships between tables remain consistent.

8
Multi-Selecteasy

Which TWO of the following are key characteristics of a NoSQL database compared to a traditional relational database?

Select 2 answers
A.Strict schema enforcement
B.Uses SQL as the query language
C.ACID transactions are always guaranteed
D.Flexible schema design
E.Horizontal scalability
AnswersD, E

NoSQL databases allow varied data structures within the same collection.

Why this answer

NoSQL databases often use flexible schemas (allowing varied data structures) and can scale horizontally across many servers.

9
MCQmedium

A company stores customer data in a flat file. Which of the following is a disadvantage of using a flat file compared to a relational database?

A.Flat files are slower for sequential reads
B.Flat files support complex queries
C.Flat files do not support concurrent multi-user access
D.Flat files enforce referential integrity
AnswerC

Correct; flat files lack concurrency control.

Why this answer

Flat files lack built-in support for concurrent access, leading to data corruption or conflicts when multiple users try to update the file simultaneously.

10
MCQmedium

Which of the following is a characteristic of a NoSQL database compared to a relational database?

A.Requires normalized data
B.Enforces strict schema definition
C.Supports flexible schema
D.Uses SQL for queries
AnswerC

NoSQL databases allow different documents to have different fields.

Why this answer

NoSQL databases often have a flexible schema, allowing different structures in the same collection.

11
MCQeasy

Which of the following best describes a NoSQL database?

A.It stores data in tables with rows and columns.
B.It provides a flexible schema for unstructured data.
C.It uses SQL for querying.
D.It enforces strict referential integrity.
AnswerB

Correct. NoSQL databases allow dynamic schemas.

Why this answer

NoSQL databases are designed for flexible schema and can handle unstructured data, often used for big data and real-time web applications.

12
Multi-Selectmedium

An online store uses a relational database with tables: Customers, Orders, and Products. Which of the following are valid ways to query the database structure? (Select THREE.)

Select 3 answers
A.DESCRIBE Customers
B.SELECT * FROM Customers
C.INSERT INTO Customers VALUES (...)
D.SHOW TABLES
E.SELECT * FROM information_schema.tables WHERE table_schema = 'store'
AnswersA, D, E

Correct; shows columns of the Customers table.

Why this answer

SELECT retrieves data, SHOW TABLES lists tables in MySQL, and DESCRIBE shows column info. INSERT adds data, not structure.

13
MCQhard

A company stores product data in a MongoDB database. Each product document contains fields like 'name', 'price', and 'tags' (an array). What type of NoSQL database is MongoDB?

A.Document store
B.Wide-column store
C.Graph database
D.Key-value store
AnswerA

MongoDB stores documents (JSON-like objects) with flexible schemas.

Why this answer

MongoDB is a document-oriented NoSQL database that stores data in JSON-like documents.

14
MCQmedium

A company uses a relational database with a 'Customers' table and an 'Orders' table. Each order must be linked to exactly one customer. Which type of relationship exists between Customers and Orders?

A.No relationship
B.One-to-many
C.Many-to-many
D.One-to-one
AnswerB

Each customer can have multiple orders, but each order links to one customer.

Why this answer

One customer can have many orders, but each order belongs to one customer, which is a one-to-many relationship.

15
Multi-Selecthard

Which THREE of the following are valid SQL statements?

Select 3 answers
A.REMOVE TABLE Employees
B.SELECT * FROM Employees WHERE Department = 'Sales'
C.MODIFY Employees SET Salary = 60000 WHERE ID = 1
D.DELETE FROM Employees WHERE ID = 5
E.INSERT INTO Employees VALUES ('John', 50000)
AnswersB, D, E

Valid SELECT query.

Why this answer

SELECT, INSERT, UPDATE, DELETE are core DML statements. CREATE is DDL but also valid SQL.

16
Multi-Selectmedium

A database administrator needs to choose a database for an e-commerce application that requires high availability and automatic scaling. Which TWO options are cloud database services?

Select 2 answers
A.SQLite
B.Google Cloud SQL
C.Microsoft SQL Server Express
D.MySQL Community Edition
E.Amazon RDS
AnswersB, E

Google Cloud SQL is a fully managed database service.

Why this answer

Amazon RDS and Google Cloud SQL are cloud-based DBaaS offerings.

17
MCQeasy

Which of the following is a benefit of using a database instead of a flat file?

A.Simpler setup and configuration
B.Faster file transfer speeds
C.Lower storage requirements
D.Support for concurrent multi-user access
AnswerD

Correct. Databases handle concurrent access with locking and transactions.

Why this answer

Databases provide concurrent access control, allowing multiple users to read/write data simultaneously without corruption.

18
MCQeasy

A company needs to store customer orders and ensure that each order is uniquely identified. Which database concept should be used?

A.Constraint
B.Index
C.Foreign key
D.Primary key
AnswerD

Correct. A primary key uniquely identifies each row.

Why this answer

A primary key uniquely identifies each row in a table, ensuring no duplicates and no null values.

19
MCQhard

A company uses a cloud database service where the provider automatically handles backups, patching, and scaling. This deployment model is known as:

A.Database as a Service (DBaaS)
B.Platform as a Service (PaaS)
C.Software as a Service (SaaS)
D.Infrastructure as a Service (IaaS)
AnswerA

DBaaS is a managed database service in the cloud.

Why this answer

Database-as-a-Service (DBaaS) is a cloud service where the provider manages the database infrastructure.

20
MCQmedium

Which of the following is an example of a NoSQL database that stores data as JSON-like documents?

A.MySQL
B.MongoDB
C.PostgreSQL
D.SQLite
AnswerB

Correct. MongoDB is a document NoSQL database.

Why this answer

MongoDB is a document-oriented NoSQL database that stores data in BSON (binary JSON) format.

21
Multi-Selectmedium

Which TWO of the following are characteristics of a relational database? (Select TWO.)

Select 2 answers
A.It does not support SQL queries.
B.Data is stored in tables with rows and columns.
C.It is optimized for storing unstructured data like videos.
D.It uses a flexible schema that can change dynamically.
E.Relationships between tables are defined using keys.
AnswersB, E

Correct. This is a fundamental characteristic.

Why this answer

Relational databases store data in tables and enforce relationships through keys.

22
MCQmedium

In a relational database, which type of relationship is typically implemented by creating a third table (junction table) that contains foreign keys from both related tables?

A.Many-to-many
B.Self-referencing
C.One-to-one
D.One-to-many
AnswerA

Many-to-many requires an associative table with foreign keys to both tables.

Why this answer

Many-to-many relationships require a junction table to associate records from both sides.

23
MCQmedium

A SELECT statement combines rows from two tables based on a related column. Which SQL clause is used to accomplish this?

A.GROUP BY
B.ORDER BY
C.JOIN
D.WHERE
AnswerC

Correct. JOIN combines rows from tables based on a condition.

Why this answer

JOIN clauses, such as INNER JOIN, combine rows from two tables based on a related column.

24
MCQeasy

Which SQL statement is used to retrieve all columns from a table named 'Customers' where the city is 'London'?

A.SELECT * FROM Customers WHERE city = 'London';
B.RETRIEVE * FROM Customers WHERE city = 'London';
C.SELECT * FROM Customers HAVING city = 'London';
D.GET * FROM Customers WHERE city = 'London';
AnswerA

This correctly uses SELECT with WHERE clause.

Why this answer

The SELECT statement retrieves data. The correct syntax is: SELECT * FROM Customers WHERE city = 'London';

25
MCQmedium

A user needs to retrieve all product names and prices from a table named 'Products' where the price is greater than 50. Which SQL statement should be used?

A.SELECT name, price FROM Products WHERE price > 50;
B.GET name, price FROM Products WHERE price > 50;
C.SELECT name, price FROM Products;
D.SELECT * FROM Products WHERE price > 50;
AnswerA

Correct. This retrieves the required columns with the condition.

Why this answer

The SELECT statement with a WHERE clause filters rows based on a condition.

26
Multi-Selectmedium

Which TWO of the following are examples of popular relational database management systems (RDBMS)? (Select TWO.)

Select 2 answers
A.Cassandra
B.MySQL
C.MongoDB
D.PostgreSQL
E.Redis
AnswersB, D

Correct. MySQL is a popular RDBMS.

Why this answer

MySQL and PostgreSQL are both widely used relational databases.

27
Multi-Selectmedium

Which TWO of the following are examples of NoSQL database types?

Select 2 answers
A.Spreadsheet
B.Relational database
C.Flat file
D.Document store
E.Key-value store
AnswersD, E

Document stores store data in documents.

Why this answer

Document stores (e.g., MongoDB) and key-value stores (e.g., Redis) are NoSQL types.

28
MCQeasy

Which of the following is a primary advantage of using a database instead of a flat file system?

A.Supports concurrent multi-user access with data integrity
B.No need for data validation
C.Data is stored in a single file for easy backup
D.Simpler to set up and maintain
AnswerA

Databases handle concurrent access and maintain data integrity through ACID properties.

Why this answer

Databases provide structured storage, multi-user access, query capabilities, and data integrity, whereas flat files lack concurrent access and query languages.

29
Multi-Selectmedium

Which TWO of the following are benefits of using a cloud database service (DBaaS) over an on-premises database?

Select 2 answers
A.No need to manage physical hardware
B.Full control over the operating system
C.Lower latency guaranteed
D.Data is always stored locally
E.Automatic scaling of resources
AnswersA, E

The cloud provider handles hardware maintenance.

Why this answer

DBaaS eliminates the need for hardware management and allows easy scaling of resources on demand.

30
Multi-Selecthard

Which THREE of the following are advantages of using a cloud database service (DBaaS) over an on-premises database? (Select THREE.)

Select 3 answers
A.No need to manage physical hardware
B.Built-in backup and disaster recovery options
C.Lower latency than on-premises in all cases
D.Automatic scaling based on demand
E.Full control over the operating system
AnswersA, B, D

Correct. The cloud provider handles hardware.

Why this answer

DBaaS provides managed services, automatic scaling, and no hardware management, reducing operational overhead.

31
MCQeasy

Which SQL statement is used to retrieve all columns from a table named 'Employees'?

A.SELECT * FROM Employees
B.RETRIEVE Employees
C.SHOW * FROM Employees
D.GET * FROM Employees
AnswerA

Correct syntax for retrieving all columns.

Why this answer

The SELECT * statement retrieves all columns from the specified table.

32
MCQhard

A database has a 'Students' table with columns: StudentID (primary key), Name, Major. Another table 'Enrollments' has columns: EnrollmentID (primary key), StudentID (foreign key), CourseID. Which SQL query correctly lists each student's name and their enrolled courses by joining the tables?

A.SELECT Name, CourseID FROM Students RIGHT JOIN Enrollments ON Students.StudentID = Enrollments.StudentID;
B.SELECT Name, CourseID FROM Students INNER JOIN Enrollments ON Students.StudentID = Enrollments.StudentID;
C.SELECT Name, CourseID FROM Students, Enrollments WHERE Students.StudentID = Enrollments.StudentID;
D.SELECT Name, CourseID FROM Students LEFT JOIN Enrollments ON Students.StudentID = Enrollments.StudentID;
AnswerB

Correct INNER JOIN syntax with matching keys.

Why this answer

INNER JOIN returns only rows with matching foreign key values; Students.StudentID = Enrollments.StudentID is the join condition.

33
MCQmedium

In a relational database, a foreign key in the 'Enrollments' table references the primary key of the 'Students' table. What does this relationship primarily enforce?

A.Referential integrity
B.Entity integrity
C.Normalization
D.Domain integrity
AnswerA

Foreign keys maintain referential integrity between tables.

Why this answer

Foreign keys enforce referential integrity, ensuring that values in the foreign key column match a primary key value in the referenced table.

34
MCQhard

A database contains two tables: 'Authors' (AuthorID, Name) and 'Books' (BookID, Title, AuthorID). A query needs to return all authors and any books they have written, including authors with no books. Which type of JOIN should be used?

A.CROSS JOIN
B.RIGHT JOIN
C.LEFT JOIN
D.INNER JOIN
AnswerC

Correct; LEFT JOIN includes all authors.

Why this answer

A LEFT JOIN returns all rows from the left table (Authors) and matching rows from the right table (Books). If no match, NULLs are returned for the right table.

35
Multi-Selectmedium

Which THREE of the following are types of data integrity enforced in relational databases?

Select 3 answers
A.Referential integrity
B.Entity integrity
C.Network integrity
D.File integrity
E.Domain integrity
AnswersA, B, E

Ensures foreign key values match a primary key or are null.

Why this answer

Entity integrity (via primary keys), referential integrity (via foreign keys), and domain integrity (via data types and constraints) are the three main types.

36
MCQeasy

Which of the following is a valid reason to use a database instead of a spreadsheet?

A.Spreadsheets cannot store numbers
B.Spreadsheets are harder to learn
C.Databases provide query capabilities and enforce data integrity
D.Databases are always free
AnswerC

Correct; databases offer query languages and integrity constraints.

Why this answer

Databases support complex queries using SQL and provide data integrity features like constraints.

37
MCQhard

A database has a 'Students' table and an 'Enrollments' table. Which type of relationship exists if a student can enroll in multiple courses and each course can have multiple students?

A.Many-to-many
B.Many-to-one
C.One-to-many
D.One-to-one
AnswerA

Correct. Students and courses have a many-to-many relationship, often implemented via a junction table.

Why this answer

A many-to-many relationship requires a junction table (like Enrollments) linking the two tables.

38
MCQhard

A cloud database service is being considered for a startup to avoid hardware maintenance and allow automatic scaling. Which type of service is this?

A.Software as a Service (SaaS)
B.Database as a Service (DBaaS)
C.Infrastructure as a Service (IaaS)
D.Platform as a Service (PaaS)
AnswerB

Correct. DBaaS offers managed database services with automatic scaling.

Why this answer

Database-as-a-Service (DBaaS) provides managed database instances in the cloud, handling maintenance, backups, and scaling.

39
MCQmedium

A database designer wants to reduce data redundancy and avoid update anomalies. Which process should be applied?

A.Denormalization
B.Normalization
C.Encryption
D.Indexing
AnswerB

Correct. Normalization reduces data redundancy and improves integrity.

Why this answer

Normalization is the process of organizing data to minimize redundancy and dependency, typically by dividing tables and establishing relationships.

40
MCQhard

A developer modifies a database and wants to ensure that every value in a column meets a specific condition, such as age must be between 0 and 120. Which type of integrity constraint should be used?

A.Referential integrity
B.Domain integrity
C.User-defined integrity
D.Entity integrity
AnswerB

Correct. Domain integrity enforces valid data values for columns.

Why this answer

Domain integrity ensures that data falls within a valid range or set of values, often enforced with CHECK constraints.

41
MCQhard

A database designer wants to ensure that every value in a column called 'Status' is either 'Active', 'Inactive', or 'Pending'. Which type of constraint should be applied?

A.Entity integrity
B.Domain integrity
C.User-defined integrity
D.Referential integrity
AnswerB

Correct; domain integrity limits the allowable values for a column.

Why this answer

Domain integrity is enforced by data type and check constraints. A CHECK constraint on the Status column can restrict values to the allowed list.

42
Multi-Selecteasy

Which of the following are advantages of using a cloud database service (DBaaS) compared to an on-premises database? (Select TWO.)

Select 2 answers
A.Full control over underlying hardware
B.Requires dedicated IT staff for database administration
C.Managed maintenance and updates
D.Higher initial capital expenditure
E.Automatic scalability
AnswersC, E

Correct; the provider handles maintenance.

Why this answer

DBaaS provides managed maintenance and automatic scalability without hardware management. High availability is inherent, and initial cost is lower (pay-as-you-go).

43
MCQmedium

A database administrator wants to enforce that every record in the 'Orders' table must have a non-null unique value in the 'OrderID' column. Which database concept ensures this?

A.Referential integrity
B.Entity integrity
C.Input validation
D.Domain integrity
AnswerB

Entity integrity is enforced by the primary key constraint.

Why this answer

Entity integrity requires a primary key to be unique and not null for each row.

44
MCQeasy

Which SQL command is used to add a new row to a table?

A.INSERT INTO
B.ADD
C.CREATE
D.UPDATE
AnswerA

INSERT adds new records.

Why this answer

INSERT INTO is the SQL command for adding new rows.

45
MCQmedium

A database designer wants to split a table into two to reduce data redundancy and avoid update anomalies. This process is known as:

A.Normalization
B.Denormalization
C.Indexing
D.Partitioning
AnswerA

Normalization splits tables to eliminate redundancy.

Why this answer

Normalization is the process of organizing data to reduce redundancy and improve integrity.

46
MCQhard

Which SQL statement would you use to retrieve the names of all products with a price greater than $50 from a table named 'Products'?

A.SELECT Name FROM Products WHERE Price > 50
B.SELECT Name FROM Products HAVING Price > 50
C.SELECT * FROM Products IF Price > 50
D.GET Name FROM Products WHERE Price > 50
AnswerA

This correctly retrieves product names with price > 50.

Why this answer

The SELECT statement is used to query data; the WHERE clause filters rows. The correct syntax is SELECT column FROM table WHERE condition.

47
MCQmedium

An employee wants to add a new customer record to the 'Customers' table with columns 'ID', 'Name', and 'Email'. Which SQL statement should be used?

A.ADD INTO Customers VALUES (1, 'John', 'john@example.com');
B.INSERT Customers VALUES (1, 'John', 'john@example.com');
C.UPDATE Customers SET Name='John' WHERE ID=1;
D.INSERT INTO Customers VALUES (1, 'John', 'john@example.com');
AnswerD

Correct. This inserts a new row with specified values.

Why this answer

The INSERT statement adds new rows to a table.

48
Multi-Selecthard

A database designer is normalizing a table that contains repeating groups (multiple values in one column). Which of the following are goals of normalization? (Select THREE.)

Select 3 answers
A.Simplify the database schema
B.Improve query performance
C.Eliminate update anomalies
D.Reduce data redundancy
E.Enforce data integrity
AnswersC, D, E

Correct; normalization reduces anomalies when updating data.

Why this answer

Normalization aims to reduce redundancy, enforce data integrity, and eliminate update anomalies. It rarely improves query performance (often may reduce it due to more joins).

49
Multi-Selecthard

A university database includes tables: 'Professors' (ProfessorID, Name, Department) and 'Courses' (CourseID, Title, ProfessorID). Which THREE statements about this design are correct?

Select 3 answers
A.The primary key of Professors is CourseID.
B.The primary key of Professors is ProfessorID.
C.The relationship between Professors and Courses is many-to-many.
D.ProfessorID in Courses is a foreign key referencing Professors.
E.A professor can be associated with multiple courses.
AnswersB, D, E

ProfessorID uniquely identifies each professor.

Why this answer

ProfessorID in Courses is a foreign key; many courses can have the same professor (one-to-many); the primary key of Professors is ProfessorID.

50
MCQmedium

A database administrator needs to ensure that every record in the 'Orders' table can be uniquely identified. Which constraint should be applied to the 'OrderID' column?

A.PRIMARY KEY
B.FOREIGN KEY
C.UNIQUE constraint
D.CHECK constraint
AnswerA

A primary key ensures each row is uniquely identified.

Why this answer

A primary key uniquely identifies each row in a table; it must contain unique values and no NULLs.

51
MCQmedium

Which of the following is an example of a NoSQL database?

A.Oracle Database
B.MySQL
C.PostgreSQL
D.MongoDB
AnswerD

Correct; MongoDB is NoSQL.

Why this answer

MongoDB is a popular document-oriented NoSQL database.

52
MCQeasy

Which SQL statement is used to remove all rows from a table while keeping the table structure?

A.DROP TABLE
B.ALTER TABLE
C.DELETE FROM table_name;
D.REMOVE FROM table_name;
AnswerC

Correct. DELETE without WHERE removes all rows but keeps the table.

Why this answer

DELETE removes rows based on a condition or all rows if no WHERE clause is used, but TRUNCATE also removes all rows. However, DELETE is the standard DML command.

53
Multi-Selecthard

A database designer wants to reduce data redundancy in a relational database. Which THREE of the following are normalization techniques or concepts?

Select 3 answers
A.Denormalization for performance
B.Eliminating partial dependencies by moving attributes to appropriate tables
C.Removing duplicate columns by creating separate tables
D.Using a single table to store all data
E.Ensuring each table has a primary key
AnswersB, C, E

This is part of achieving 2NF.

Why this answer

Normalization involves splitting tables to reduce redundancy. First normal form (1NF) eliminates repeating groups, second normal form (2NF) removes partial dependencies, and third normal form (3NF) removes transitive dependencies.

54
MCQeasy

Which of the following is a primary advantage of using a database over a flat file system for storing customer records?

A.Simpler to set up and manage
B.Supports simultaneous multi-user access
C.Stores data in a non-structured format
D.No need for a query language
AnswerB

Databases are designed for concurrent access with transaction controls.

Why this answer

Databases support concurrent multi-user access with locking mechanisms, while flat files cannot handle simultaneous writes safely.

Ready to test yourself?

Try a timed practice session using only Itf Database Fundamentals questions.

CCNA Itf Database Fundamentals Questions | Courseiva