Midterm Test Kom4043-Pembangunan Sistem Pangkalan Data (2 HOURS)
Midterm Test Kom4043-Pembangunan Sistem Pangkalan Data (2 HOURS)
(2 HOURS)
2. What is a database?
a) Organized collection of information that cannot be accessed, updated, and managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and managed
d) Organized collection of data that cannot be updated
3. What is DBMS?
a) DBMS is a collection of queries
b) DBMS is a high-level language
c) DBMS is a programming language
d) DBMS stores, modifies and retrieves data
5. In which of the following formats data is stored in the database management system?
a) Image
b) Text
c) Table
d) Graph
12. Which of the following is known as a set of entities of the same type that share same
properties, or attributes?
a) Relation set
b) Tuples
c) Entity set
d) Entity Relation model
16. The ability to query data, as well as insert, delete, and alter tuples, is offered by
____________
a) TCL (Transaction Control Language)
b) DCL (Data Control Language)
c) DDL (Data Definition Langauge)
d) DML (Data Manipulation Langauge)
17. ______________ is a set of one or more attributes taken collectively to uniquely identify a
record.
a) Primary Key
b) Foreign key
c) Super key
d) Candidate key
19. Which of the following command is correct to delete the values in the relation teaches?
a) Delete from teaches;
b) Delete from teaches where Id =’Null’;
c) Remove table teaches;
d) Drop table teaches;
22. The traditional storage of data organized by the customer, stored in separate folders in filing
cabinets is an example of ______________ type of ‘database’ management system.
a) Object-oriented database management system
b) Relational database management system
c) Network database management system
d) Hierarchical database management system
23. After groups have been established, SQL applies predicates in the ___________ clause,
allowing aggregate functions to be used.
a) Where
b) Having
c) Group by
d) With
25. What does a foreign key combined with a primary key create?
a) Network model between the tables that connect them
b) Parent-Child relationship between the tables that connects them
c) One to many relationship between the tables that connects them
d) All of the mentioned
26. Which of the following is correct according to the technology deployed by DBMS?
a) Pointers are used to maintain transactional integrity and consistency
b) Cursors are used to maintain transactional integrity and consistency
c) Locks are used to maintain transactional integrity and consistency
d) Triggers are used to maintain transactional integrity and consistency
4
a) Clears entries from relation
b) Deletes relation
c) Deletes particular tuple from relation
d) All of the mentioned
Name
Annie
Bob
Callie
Derek
29.
Which of these query will display the the table given above ?
a) Select employee from name
b) Select name
c) Select name from employee
d) Select employee
30.
Q 3) Why is the use of DBMS recommended? Explain by listing some of its major advantages.
(5 Marks)
2. Write a query to get current Product list (Product ID and name). (2 marks)
Code:
3. Write a query to get discontinued Product list (Product ID and name). (5 marks)
4. Write a query to get most expense and least expensive Product list (name and unit price). (4
marks)
5. Write a query to get Product list (id, name, unit price) where current products cost less than
$20. (6 marks)
6. Write a query to get Product list (id, name, unit price) where products cost between $15 and
$25. (6 marks)
7. Write a query to count current and discontinued products. (3 marks)
Code:
8. Write a query to get Product list (name, units on order , units in stock) of stock is less than the
6
quantity on order. (5 marks)