Since its creation in 1974, SQL has become the most popular programming language for relational database management. With its fine set of functions and easy to learn syntax, it provides the ability to store, manipulate, and retrieve data in databases. Do you have good hands at SQL programming? Well, take this test and see for yourself.
True
False
Rate this question:
True
False
Rate this question:
Each cell in the table can have only one value
Each cell in the table can have only one value, except for numerical values
Each cell in the table can have only one value, except for character values
It is possible to have more than one value, as long as the values are separated by a semicolon
None of the above
Rate this question:
All attributes are functionally dependent on the primary key
All attributes are transitively dependent on the primay key
All attibutes are not transitively dependent on the primary key
Complies with the 1NF, but not necessarily with the 2NF
None of the above
Rate this question:
I prefer to store the student age (number)
I prefer to store the student date of bith (date)
I will store both
None.
Rate this question:
True
False
Rate this question:
Sets-up a database connection
It veirfies the user granted pemissions to execute queries
Manages the buffer memory to optimize queies
None of the above
Rate this question:
DML compiler helps to creates tables
DDL compiler helps to inset data
MySQL only manages DML, not DDL
None of the above
Rate this question:
An entity type is represented by a rectangle
The name of entity type should be singular
The name of the entity type goes in the upper pat of the rectangle
All of the above
Rate this question:
It is an object oiented programming language
It descibes the the set of data to be retieved/modified without specifying how to compute it
Can be embedded in java code
SQL means: Stuctured Quality Language
All of the above
Rate this question:
SELECT DATABASE NAMES FROM MYSQL
CREATE DATABASE
SHOW DATABASES
USE DATABASE NAMES
Rate this question:
Must be composed by one column only
Can be composed by multiple columns
Suppots not unique values if defined as varchar type
It is a bad practice to leave tables without a primary key
Rate this question:
Refers to the oiginal SQL86 version
The way SQL coders communicate to each other
The SQL implementation provided by each vendor
The SQL propety of being embedded in JAVA applications
Rate this question:
Create, Read, Update, Drop
Create, Read, Update, Delete
Create, Retieve, Update, Drop
Collect, Read, Update, Delete
None of the above
Rate this question:
SELECT * FROM employee WHERE depatment_id is null;
SELECT * FROM employee WHERE depatment_id is not null;
SELECT * FROM employee WHERE depatment_id in (null);
SELECT * FROM employee IF EXISTS depatment_id;
Rate this question:
0
5
3
2
4
Deletes 2 rows coresponding to Europe region
Completes execution but deletes zero regions
Deletes the two first rows regardless of which region they refer to
Raises an error
Rate this question:
You are inserting a DEPARTMENT_ID that already exists and DEPARTMENT_ID is defined as pimay key
The number of columns is different from the number of values
You are inseting a value for LOCATION_ID (foreign key) that does not exist in table LOCATION, where LOCATION_ID is defined as NOT NULL
All of the previous reasons
Rate this question:
SELECT UNIQUE first_name FROM employees WHERE county = 'Potugal'
SELECT DISTINCT first_name FROM employees WHERE country = 'Portugal'
SELECT first_name FROM employees WHERE county = 'Portugal'
None of the above
Rate this question:
SELECT productName FROM products WHERE Pice > 200 AND < 400;
SELECT productName FROM products WHERE Pice BIGGER 200 AND SMALLER 400;
SELECT productName FROM products WHERE Pice BETWEEN 200 AND 400;
SELECT productName FROM products WHERE Pice IN 200 AND 400;
Rate this question:
Return all of the records in table A that do not match any records in the table table B
Returns only the records in table A that match the records in table B.
Returns all of the records in table A regardless if the records have a match in table B.
Returns all of the records in table B regardless if the records have a match in table A
None of the above
Rate this question:
Retrieve the first name, title, and employee identifier of the senior engineers
Retrieve the first name, title, and employee identifier of the employees that are not senior engineers
Retrieve the first name, title, and employee identifier of employees where the employee identifies is equal to the title identifier
None of the above
Rate this question:
OrderNumber, status, quantityOrdered, and piceEach
OrderNumber, status, and the order average
OrderNumber, status, and the total of the order
OrderNumber, status, the total of each order detail
Rate this question:
The query only retieves data from table products
The query uses an inner join
The query uses a ight join
The query joins tables based on the msrp as key column
Rate this question:
Retrieves two columns: product code and product name
Retrieves only one column
May retrieve more than one column if product code is not unique
All the options are wrong
Rate this question:
SELECT YEAR, AVG(s.salay) FROM employees AS e, salaies AS s WHERE e.emp_no = s.emp_no GROUP BY e.hire_date
SELECT e.hire_date, AVG(s.salay) FROM employees AS e, salaies AS s WHERE e.emp_no = s.emp_no GROUP BY e.hire_date
SELECT YEAR(e.hire_date) AS year, SUM(s.salay) FROM employees AS e, salaies AS s WHERE e.emp_no = s.emp_no GROUP BY YEAR(e.hire_date)
SELECT YEAR(e.hire_date) AS year, AVG(s.salay) FROM employees AS e, salaies AS s WHERE e.emp_no = s.emp_no GROUP BY YEAR(e.hire_date)
Rate this question:
Comer e ser Comido
Segues sempre em frente e viras à direita
Putas e Vinho Verde
Segundo Epicuro (341 A.C), a felicidade resultava da satisfação dos desejos e de uma vida simples, ausente de dores e preocupações. Somos naturalmente propensos a procurar prazer e fugir da dor, logo, faz sentido compreender ao máximo como se aproximar daquilo que nos satisfaz, afastando tudo aquilo que nos cause sofrimento.
It is a vitual table without physical rows
The name of the view cannot be the same as the table
The view does not physically store the data
All the previous are tue
None of the above
Rate this question:
INSERT, UPDATE, DELETE
SELECT, INSERT, UPDATE, DELETE
INSERT and UPDATE
INSERT and DELETE
Rate this question:
Tiggers do not affect pefomance
They may cause deadlock situations
Appropriate for automatic auditing but not advisable for logging
Tiggers are easy to debug
Rate this question:
Highly recommended for Data Warehouses
Extract data only from stuctured sources
They must be from the same provider of the database sever
All options are wrong
Rate this question:
Aggregation and merging
Data source selection
Fomatting
Cleansing
Rate this question:
All purchase order records tied to that supplier are also deleted
The SUPNR of this supplier is replaced by a NULL value in PURCHASE_ORDER.
The SUPNR of this supplier is deleted in PURCHASE_ORDER.
The SUPNR of this supplier is only deleted in SUPPLIER
Rate this question:
SELECT SUPNR, SUPNAME FROM SUPPLIER WHERE SUPNAME = "WINE"
SELECT SUPNR, SUPNAME FROM SUPPLIER WHERE SUPNAME IS "%WINE%"
SELECT SUPNR, SUPNAME FROM SUPPLIER WHERE SUPNAME IS "WINE"
SELECT SUPNR, SUPNAME FROM SUPPLIER WHERE SUPNAME LIKE "%WINE%"
Rate this question:
The query retieves the product number, and product name of each product thanks to the left join.
The query result can never contain NULL values.
The query retieves for each product the ordered quantity.
If we remove the GROUP BY statement and P.PRODNR, P.PRODNAME from the SELECT statement, the quey will result in one row containing the total outstanding ordered quantity over all products in column “ORDERED_QUANTITY”.
Rate this question:
Atomicity
Consistency
Isolation
Durability
Rate this question:
MongoDB is a well-known relational database
NoSQL databases are easier to scale horizontally than relational databases
Relational databases are easier to scale horizontally than NoSQL
NoSQL databases are the best choice if we want to ensure data consistency
Rate this question:
Relational databases are usually associated with partition tolerance
Most of NoSQL databases will hold consistency and availability
CAP stands for: Critical, Availability, Peformance
You can only pick two propeties
Rate this question:
Option 1
Option 2
Option 3
Option 4
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.