1. The relationship among Database(DB), Database System(DBS) and Database Management System(DBMS) is ______.
A. DBMS includes DB and DBS B.DBS includes DB and DBMS
C. DB includes DBS and DBMS D.DB is DBS, also as DBMS
2. In database fields, we refer SQL as _______.
A. Standard Query Language B. Structured Query Language
C. System Query Language D. Sequence Query Language
3. Choose the proper choice to make the following query to realize:
Find the names of all customers whose street includes the substring “Main”.
select customer_name
from customer
where customer_street ________
A. like ‘Main\%’ B. like ‘_Main_’
C. like ‘%Main%’ D. like ‘\Main_’
4. Choose the only one INCORRECT description from the followings: _____
A. Neither tuples nor attributes have order.
B. Attributes can appear in any order and the relation is still the same.
C. Each value in the database must be a member of some domain.
D. Duplicate tuples can exist in a relation.
II. Briefly description questions. (Write your answers onto the answer sheet.) (24 marks)
1. What are key constraints and foreign constraints?
2. Please briefly list FOUR duties of a database administrator.
3. Explain LEFT JOIN, OUTER JOIN and INNER JOIN.
ALL ANSWERS ARE HIGHLITED
1. The relationship among Database(DB), Database System(DBS) and Database Management System(DBMS) is ______.
A. DBMS includes DB and DBS B.DBS includes DB and DBMS
C. DB includes DBS and DBMS D.DB is DBS, also as DBMS
2. In database fields, we refer SQL as _______.
A. Standard Query Language B. Structured Query Language
C. System Query Language D. Sequence Query Language
3. Choose the proper choice to make the following query to realize:
Find the names of all customers whose street includes the substring “Main”.
select customer_name
from customer
where customer_street ________
A. like ‘Main\%’ B. like ‘_Main_’
C. like ‘%Main%’ D. like ‘\Main_’
4. Choose the only one INCORRECT description from the followings: _____
A. Neither tuples nor attributes have order.
B. Attributes can appear in any order and the relation is still the same.
C. Each value in the database must be a member of some domain.
D. Duplicate tuples can exist in a relation.
II. Briefly description questions. (Write your answers onto the answer sheet.) (24 marks)
1. What are key constraints and foreign constraints?
SQL constraints are used to specify rules for the data in a table. Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the table. If there is any violation between the constraint and the data action, the action is aborted.
2. Please briefly list FOUR duties of a database administrator.
1. Data policies, procedures, standards
2. Planning- development of organization's IT strategy, enterprise model, cost/benefit model, design of database environment, and administration plan.
3. Data conflict (ownership) resolution
4. Data analysis- Define and model data requirements, business rules, operational requirements, and maintain corporate data dictionary
5. Internal marketing of DA concepts
6. Managing the data repository
3. Explain LEFT JOIN, OUTER JOIN and INNER JOIN.
INNER JOIN is used to return rows from both tables which satisfy the given condition. It is the most widely used join operation and can be considered as a default join-type
RIGHT JOIN returns all the columns from the table on the right even if no matching rows have been found in the table on the left. Where no matches have been found in the table on the left, NULL is returned. RIGHT outer JOIN is the opposite of LEFT JOIN
An OUTER JOIN doesn't require each record in the two join tables to have a matching record. In this type of join, the table retains each record even if no other matching record exists.
Comments
Leave a comment