
Database Management System II - Midterm Examination
Quiz by Felipe Sinjetsu
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
17 questions
Show answers
- Q1Your people lead asked you what table will serve as the parent table in the relationship given that customer.customer_ID (reference key) = order.customer_ID (foreign key).order.customer_IDcustomer_IDordercustomer30s
- Q2As a database designer, your Project Manager asked you to create an SQL which will join three tables that will show only the record of a specific person. What type of join is appropriate?inner joinleft joincross joinright join30s
- Q3Your project manager asked you to create a one-to-one relationship between two tables, what constraint/key will you put to the attribute in the foreign key/child table?foreignindexuniqueprimary30s
- Q4Your manager wants you to make the attribute name in the customer table to have "No name" as value if a user didn't put any name on it. What type of constraint will you use?null/not nulldefaultcheckprimary key30s
- Q5Your lead wants to make the structure of deleting data in your database tables as, the data be deleted first in the child table before the data in parent table. What foreign key option is appropriate?set nullstrictcascaderestrict30s
- Q6Your manager wants to make the structure of deleting/updating data in your database tables as, if the data in the parent table is updated/deleted, same goes to the child table. What foreign key option is appropriate?set nullrestrictcascadeno action30s
- Q7Between the relation customer with an attribute of customer_ID (primary key) and relation account with an attribute of customer_ID (unique key) where should be the reference key be located?account.customer_IDaccountcustomer.customer_IDcustomer30s
- Q8Your people lead asked you to put a constraint to an attribute of your table which will set to Null value if the attribute has no value in it. What constraint is more likely appropriate?Not nulldefaultindexforeign30s
- Q9Your project manager asked you to connect or create relationship to the tables of your database. What appropriate constraint will you use?foreignuniqueindexprimary30s
- Q10Supply the missing parts in the JOIN clause to join the two tables Orders and Customers, using the CustomerID field in both tables as the relationship between the two tables. SELECT * FROM Orders LEFT JOIN Customers ___________________ = _____________.ON Orders.CustomerID = Customers.CustomerIDWHERE Customers.CustomerID = Orders.CustomerIDOrders.CustomerID=Customers.CustomerIDINNER JOIN Customers.CustomerID = Orders.CustomerID45s
- Q11Choose the correct JOIN clause to select all records from the two tables where there is a match in both tables. SELECT * FROM Orders ________________ ON Orders.CustomerID=Customers.CustomerID;LEFT JOIN OrdersINNER JOIN CustomersLEFT JOIN CustomersINNER JOIN Orders45s
- Q12Choose the correct JOIN clause to select all the records from the Customers table plus all the matches in the Orders table. SELECT * FROM Orders ____________________ ON Orders.CustomerID=Customers.CustomerID;RIGHT JOIN CustomersINNER JOIN CustomersLEFT JOIN CustomersCROSS JOIN Customers45s
- Q13An INNER JOIN returns rows of tables where the data _____.IntersectsIs read-onlyIs differentIs not NULL30s
- Q14Your manager wants you to return all the records from both tables customers and orders which will return in a very large result-sets of record. What appropriate join is needed in MySQL?cross joininner joinleft and righ joinfull outer join30s
- Q15You project lead wants you to put a constraint in an attribute email in customer table that will ensure the values in that attribute always different. What constraint is appropriate?spatialforeignindexunique30s