Q1
True / FalseMySQL is typically used to store structured data.
MySQL is a relational database management system (RDBMS) that is designed to manage structured data, which is organized into tables with rows and columns.
Q2
True / FalseUnstructured data cannot be stored in a MySQL database.
While MySQL is optimized for structured data, unstructured data can still be stored using data types like BLOB (Binary Large Object) or TEXT, though it is less efficient for this purpose.
Q3
True / FalseJSON data, which is semi-structured, can be stored and queried within MySQL.
MySQL has native support for JSON data types, allowing for efficient storage and querying of JSON documents.
Q4
True / FalseMySQL's performance is the same for structured and unstructured data.
MySQL is optimized for structured data, and its performance can degrade when handling large amounts of unstructured data, especially if not indexed properly.
Q5
True / FalseMySQL does not support full-text search capabilities for unstructured data.
MySQL supports full-text search, which allows for efficient searching within unstructured text data stored in TEXT or VARCHAR columns.
Q6
True / FalseRelational databases like MySQL are generally better for OLTP (Online Transaction Processing) systems which typically involve structured data.
MySQL and other relational databases are optimized for OLTP systems, which handle structured data transactions efficiently.
Q7
True / FalseMySQL can natively handle both structured and unstructured data equally well without any performance tuning.
Handling unstructured data in MySQL may require performance tuning and optimization techniques, such as proper indexing and partitioning, to maintain efficiency.
Q8
True / FalseIn MySQL, indexing is equally effective for both structured and unstructured data.
Indexing is generally more effective for structured data, where columns and data types are well-defined. Indexing unstructured data can be more complex and less efficient.
Q9
True / FalseMySQL's InnoDB storage engine supports storing large binary objects (BLOBs) which can be used for unstructured data.
The InnoDB storage engine in MySQL supports BLOB data types, allowing for the storage of large binary objects, which are often unstructured data.
Q10
True / FalseIn MySQL 8.0, the JSON data type provides a more efficient way to handle unstructured data compared to using BLOB or TEXT data types.
MySQL 8.0 introduced enhancements to the JSON data type, including better performance and indexing capabilities, making it more efficient for handling semi-structured and unstructured data compared to traditional BLOB or TEXT types.
Q21
Multiple ChoiceIdentify the correct SQL statement to store structured data in a relational table.
SQL Code
CREATE TABLE employees (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
department VARCHAR(50),
salary DECIMAL(10,2)
);
This SQL statement creates a table for storing structured data about employees, including fields like name, department, and salary.
Q22
Multiple ChoiceChoose the correct SQL statement to store unstructured data like JSON in a relational table.
SQL Code
CREATE TABLE documents (
id INT AUTO_INCREMENT PRIMARY KEY,
document_name VARCHAR(100) NOT NULL,
content JSON
);
This SQL statement creates a table designed to store unstructured data using the JSON data type, suitable for storing flexible data structures.
Q24
Multiple ChoiceWhich SQL statement correctly queries unstructured JSON data stored in a relational table?
SQL Code
SELECT document_name, JSON_UNQUOTE(JSON_EXTRACT(content, '$.author')) AS author
FROM documents
WHERE JSON_CONTAINS(content, '"MySQL"', '$.tags');
This SQL statement uses JSON functions to extract and filter data from JSON content stored in the documents table.
Q26
Multiple ChoiceDetermine the correct SQL statement to combine structured and unstructured data in a single query.
SQL Code
SELECT e.name, e.department, JSON_UNQUOTE(JSON_EXTRACT(d.content, '$.document_type')) AS document_type
FROM employees e
JOIN documents d ON e.id = d.employee_id
WHERE e.department = 'HR';
This SQL statement combines structured data from the employees table with unstructured JSON data from the documents table using a JOIN operation.
Q27
Multiple ChoiceWhich SQL statement correctly creates a table designed to store both structured and unstructured data?
SQL Code
CREATE TABLE mixed_data (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(100) NOT NULL,
metadata JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
This SQL statement creates a table that includes both structured data (title, created_at) and unstructured data (metadata stored as JSON).
Q30
Multiple ChoiceDetermine the correct SQL statement to insert structured data with an embedded unstructured JSON field.
SQL Code
INSERT INTO user_data (user_id, name, preferences)
VALUES (1, 'John Doe', '{"theme": "dark", "notifications": true}');
This SQL statement inserts structured data into the user_data table, with the preferences column containing embedded unstructured JSON data.