Database Management System Lab Prelim Q2
Database Management System Lab Prelim Q2
Michelle M. Esperal
PRELIM LAB QUIZ 2
Completed on Monday, 12 June 2023, 10:30 PM
Marks 19.00/20.00
Grade 95.00 out of 100.00
Question 1
Question text
Consists of a collection of DML statements that form a logical unit of work.
Select one:
a.
Transaction
b.
DDL
c.
Select
d.
DML
Question 2
Question text
Suppose that a user wanted to insert a new value using the implicit method which of the
following is the correct example.
Select one:
a.
INSERT INTO STUDENTS VALUES (10, NULL,’ELENA’,NULL);
b.
INSERT INTO STUDENST(USN_ID, FIRSTNAME)
VALUES(10,’ELENA’)
c.
INSERT INTO STUDENTS VALUES (USN_ID, FIRSTNAME)
(10,’ELENA’)
d.
INSERT INTO STUDENTS VALUES (10,’ELENA’)
Question 3
Question text
It logically represents subsets of data from one or more table.
Select one:
a.
Index
b.
Synonym
c.
View
d.
Table
Question 4
Question text
Suppose that a user wanted to change the datatype of column ADDRESS from Varchar to
Char which of the following is the correct example.
Select one:
a.
ALTER STUDENTS
MODIFY ADDRESS VARCHAR(20);
b.
ALTER STUDENTS
SET ADDRESS VARCHAR(20);
c.
ALTER TABLE STUDENTS
SET ADDRESS VARCHAR(20);
d.
ALTER TABLE STUDENTS
MODIFY ADDRESS VARCHAR(20);
Question 5
Question text
Suppose that a user wanted to insert a new value using the explicit method which of the
following is the correct example.
Select one:
a.
INSERT INTO STUDENST(USN_ID, FIRSTNAME)
VALUES(10,’ELENA’)
b.
INSERT INTO STUDENTS VALUES (10, NULL,’ELENA’,NULL);
c.
INSERT INTO STUDENTS VALUES (10,’ELENA’)
d.
INSERT INTO STUDENTS VALUES (USN_ID, FIRSTNAME)
(10,’ELENA’)
Question 6
Question text
A type of insert statement that omit the column from the column list.
Select one:
a.
Excluded
b.
Implicit
c.
included
d.
Explicit
Question 7
Question text
Suppose that a user wanted to update the lastname of student to ‘Santos’ and YR_LVL to
‘Irreg’ whose USN_ID is equal to 50, in one select statement which of the following is the
correct sql statement to use.
Select one:
a.
UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, YR_LVL = ‘IRREG’;
b.
UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, YR_LVL = ‘IRREG’
WHERE USN_ID = 50;
c.
UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, SET YR_LVL = ‘IRREG’;
d.
UPDATE STUDENTS
SET LASTNAME = ‘SANTOS’, SET YR_LVL = ‘IRREG’
WHERE USN_ID = 50;
Question 8
Question text
A statement that is use to rename the table or change the existing name of the table.
Select one:
a.
Update
b.
Name
c.
Rename
d.
Alias
Question 9
Question text
An alter statement that is used to add new column to the table.
Select one:
a.
DROP
b.
ADD
c.
DELETE
d.
MODIFY
Question 10
Question text
A type of DML statement that is use to update existing rows in a table.
Select one:
a.
INSERT
b.
UPDATE
c.
DELETE
d.
TRUNCATE
Question 11
Question text
A type of DML statement that is use to remove existing rows in a table.
Select one:
a.
INSERT
b.
UPDATE
c.
TRUNCATE
d.
DELETE
Question 12
Question text
A type of insert statement that specify the NULL keyword in the VALUES clause.
Select one:
a.
Explicit
b.
Implicit
c.
included
d.
Excluded
Question 13
Question text
An alter statement that is used to delete an existing column in the table.
Select one:
a.
MODIFY
b.
DELETE
c.
DROP
d.
ADD
Question 14
Question text
Basic unit of storage composed of rows and columns
Select one:
a.
View
b.
Table
c.
Index
d.
Synonym
Question 15
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
Suppose that a user wanted to add a new column name as CITY datatype set to char size 10.
Which of the following is the correct sql statement?
Select one:
a.
ALTER TABLE STUDENTS
ADD COLUMN CITY CHAR(10);
b.
ALTER TABLE STUDENTS
ADD COLUMN CITY VARCHAR(10);
c.
ALTER TABLE STUDENTS
ADD CITY VARCHAR(10);
d.
ALTER TABLE STUDENTS
ADD CITY CHAR(10);
Question 16
Question text
Which of the following datatype is not being used in oracle?
Select one:
a.
VARCHAR
b.
INT
c.
CHAR
d.
NUMBER
Question 17
Question text
An alter statement that is used to update an existing column datatype or datatype size.
Select one:
a.
DROP
b.
DELETE
c.
MODIFY
d.
ADD
Question 18
Question text
Suppose that a user uses the DELETE statement as shown below: what is/are the possible
output.
Select one:
a.
0 rows are deleted.
b.
All rows are deleted including table structure.
c.
0 rows are updated.
d.
All rows are deleted but the table is still intact.
Question 19
Question text
Which of the following is not true about ALTER statement?
Select one:
a.
Define a default value for the new column
b.
Drop a column
c.
Insert new row in a table
d.
Modify an existing column definition
Question 20
Question text
A type of DML statement that is use to add new rows in a table.
Select one:
a.
INSERT
b.
DELETE
c.
UPDATE
d.
TRUNCATE