Practice Final Flashcards
(43 cards)
In the figure below, which of the following apply to both OUTPATIENTs and RESIDENT_PATIENTs?
Checkback_Date
Date_Discharged!
Patient_Name
XML
What does the following SQL statement do?
DELETE FROM Customer_T
WHERE state = ‘HI’;
Deletes all records from Customer_t where the state is equal to HI
Removes the Customer_T table from the database
Deletes all records from the Customer_T table
Doesn’t delete anything because of a syntax error
MongoDB databases are composed of:
collections.
tables.
rowsets.
columns
A subquery must use 3rd
normal form table as the outer table.
False
True
Depends on the schema
None of the choices
The ________ states that no primary key attribute may be null.
referential integrity constraint
*entity integrity rule *
partial specialization rule
range domain rule
Which SQL function can be used to calculate the total amount of all orders for a specific customer?
*SUM() *
MAX()
TOTAL()
AVG()
None of the above choices
Which of the following are properties of relations?
Each attribute has the same name.
*No two rows in a relation are identical. *
There are multivalued attributes in a relation.
All columns are numeric.
All of the following are guidelines for better query design EXCEPT:
understand how indexes are used in query processing.
- use a lot of self-joins. *
write simple queries.
retrieve only the data that you need.
Consider below data in the table.
Technician
———-
Allen
Jacob
Smith
Jones
Hunter
Mark
Jacy
Ogburn
Chris
Dwayne
———-
Which of the following RegEX will find all the names that start with letter “J”?
REGEXP_LIKE(Technician,’*J’)
REGEXP_LIKE(Technician,’$J’)
REGEXP_LIKE(Technician,’J^’)
- REGEXP_LIKE(Technician,’^J’) *
The following code is an example of a(n):
SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;
*equi-join. *
subquery.
Full Outer JOIN.
Right Outer JOIN.
What will be returned when the following SQL query is executed?
SELECT driver_no, COUNT() as num_deliveries
FROM deliveries
GROUP BY driver_no
HAVING COUNT() > 2;
A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries
A listing of all drivers
A listing of the number of deliveries greater than 2
A listing of all drivers who made more than 2 deliveries
Which of the following is NOT a reason to create an instance of a relational schema with sample data?
Sample data can be used to improve user communications.
Sample data can be used for prototype generation.
Sample data can reverse database implementation errors.
Sample data provide a convenient way to check the accuracy of your design.
What type of results did Left join returns?
all rows from the left table and only matching rows from the right table
all rows from the right table and only matching rows from the left table
all rows from the left table and the right table
None of the above choices
Multiple values returned from an SQL query that includes an aggregate function are called:
*vector aggregates *
scalar aggregates.
agates.
summation
NoSQL focuses on:
avoidance of replication of data.
minimizing storage space.
normalized data.
- flexibility. *
The ________ operator is used to combine the output from multiple queries into a single result table.
INTERSECT
DIVIDE
COLLATE
* UNION *
Which of the following SQL queries uses a subquery to find the second highest price in the products table?
SELECT price FROM products WHERE price = (SELECT MAX(price) FROM products);
SELECT MAX(price) FROM products WHERE price < (SELECT AVG(price) FROM products);
SELECT * FROM products WHERE price > (SELECT MIN(price) FROM products);
- SELECT MAX(price) FROM products WHERE price < (SELECT MAX(price) FROM products); *
Which of the following is the wildcard operator in SQL statements?
<>
*
* % *
&
The last part of an SQL query to be read is the ________ statement.
SELECT
FROM
WHERE
ORDER BY
A procedure is:
stored outside the database.
given a reserved SQL name.
* called by name. *
unable to be modified.
An SQL database in 3rd
normal form can be stored in a single mongo DB collection because:
By using UNION queries, one can combine all the tables.
Each table can be stored as a single Collection and then a JOIN can be performed.
Mongodb can only store 4th
normal form data.
- None of the choices*
Which of the following SQL queries uses a subquery to find the products that have not been ordered by any customer?
*SELECT * FROM products WHERE product_id NOT IN (SELECT product_id FROM orders); *
SELECT * FROM products WHERE product_id = (SELECT product_id FROM orders WHERE order_id IS NOT NULL);
SELECT * FROM products WHERE product_id NOT IN (SELECT product_id FROM orders WHERE order_id IS NULL);
SELECT * FROM products WHERE product_id NOT IN (SELECT DISTINCT product_id FROM orders);
An integrity control supported by a DBMS is:
substitute estimates.
security.
* range control. *
GUI guards.
While Oracle has responsibility for managing data inside a tablespace, the tablespace, as a whole, is managed by the:
user.
CEO.
XML.
* operating system. *