CS351 Database Management Quizzes
CS351 Database Management Quizzes
CS351 - Quizes
It is a bundle of actions which are done within Are said to exhibit physical data
a database to bring it from one consistent independence if they do not depend on the
state to a new consistent state. physical schema.
Data
He proposed the relational model for An alter statement that is used to add new
database systems in 1970. column to the table.
Which of the following is the correct example Which of the following is the correct example
of dropping the table EMPLOYEES? of modifying the column lastname? Change
the datatype size to 20.
DROP TABLE EMPLOYEES;
ALTER TABLE EMPLOYEES
Which of the following is the correct example Which of the following is the correct example
of modifying the column JOB_ID? Change the of renaming the table EMPLOYEES to
datatype size to 10. WORKERS?
Suppose that a user wanted to insert a new Suppose that a user uses the DELETE
value using the implicit method which of the statement as shown below: what is/are the
following is the correct example. possible output.
DELETE
Implicit
UPDATE STUDENTS
INSERT
Which of the following is the correct example Which of the following is the correct example
of deleting a student record from STUDENTS updating all student COURSE to ‘BSIT’ from
table whose COURSE is equal to NULL; STUDENTS table?
Which of the following is the correct example Which of the following is the correct example
of inserting new values to STUDENTS table of deleting all records in STUDENTS table;
where the course is set to NULL;
DELETE FROM STUDENTS;
INSERT INTO STUDENTS VALUES(1,'DELA
CRUZ','JUANITO',NULL);
Which of the following is the correct example
inserting a new value to STUDENTS table that
Which of the following is the correct example will only add new data to STUD_ID and
of updating the COURSE to ‘N/A’ of all LASTNAME? The stud_id is 10 and lastname
students from STUDENTS table whose is 'CRUZ' and the rest of the column is set to
course IS NULL; NULL.
Which of the following is the correct example INSERT INTO STUDENTS VALUES(1,'DELA
of updating the LASTNAME to ‘REYES’ of all CRUZ','JUANITO','BSIT');
students from STUDENTS table whose
STUD_ID is equal to 01020564?
NULL
Projection
Supposed that the user uses the ff SELECT
statement: what will be the possible output.
Selection
()
Arithmetic expression
Which of the following SELECT statement is Which of the following SELECT statement is
the correct PL/SQL that will display all rows the correctreport that will rename the column
and columns? DESCRIPTION to TITLE, PARTNUM to ID
and ONHAND to STOCK?SELECT
SELECT * FROM PARTS; DESCRIPTION AS ‘TITLE’, PARTNUM AS
‘ID’, ONHAND AS ‘STOCK’ FROM PARTS;
True/False Character values are format This is used to in conditions that compare one
sensitive and date values are case sensitive- expression with another value or expression.
sensitive.
Comparison
False
Which of the following is the correct report where ONHAND is greater than or equal to
listing only the column DESCRIPTION, 21.
PARTNUM, CLASS and PRICE of all parts
where the description fourth letter starting SELECT DESCRIPTION, ONHAND,
from the first is equal to ‘D’. WAREHOUSE FROM PARTS WHERE
ONHAND >=21;
SELECT DESCRIPTION, PARTNUM,
CLASS, PRICES FROM PARTS WHERE
DESCRIPTION LIKE ‘D%’; Which of the following is the correct report
Which of the following is the correct report listing only the column DESCRIPTION,
listing the column PARTNO, DESCRIPTION ONHAND, CLASS and PRICE of all price
and WAREHOUSE. Get only that description where the description ends with letter ‘N’.
that does not ends with ‘ER’. Note that you SELECT DESCRIPTION, ONHAND,
have to merge the said three columns, CLASSS FROM PARTS WHERE
rename the merge column as “Parts Record”. DESCRIPTION LIKE ‘%N’;
Below is the sample output for column.
Parts Record
AT94is the part number ofIRONwhich belong
Which of the following is the correct report
to warehouse3
listing only the column CLASS,
SELECT (PARTNUM || ‘is the part number DESCRIPTION and PRICE of all PARTS
of’ ||DESCRIPTION || ‘which belongs to’ || where price range is between 200 to 500. Sort
WAREHOUSE) FROM PARTS WHERE the Price in descending order.
PARTNUM LIKE ‘%ER’;
SELECT CLASS, DESCRIPTION, PRICE
FROM PARTS WHERE PRICE BETWEEN
200 AND 500;
Which of the following is the correct report
listing only the column DESCRIPTION,
WAREHOUSE, CLASS and PRICE of all parts Which of the following is the correct report that
where the description contains keyword ‘SHE’. will list only the column DESCRIPTION,
SELECT DESCRIPTION, WAREHOUSE, PARTNUM, CLASS, and PRICE of all PART
CLASS, PRICE FROM PARTS WHERE whose CLASS is equal to HW.
DESCRIPTION LIKE ‘%SHE%’; SELECT COLUMN DESCRIPTION,
PARTNUM, CLASS, PRICE FROM PARTS
WHERE CLASS=’HW’;
Which of the following is the correct report that
will display the distinct value for CLASS and
WAREHOUSE limit the rows by getting only Which of the following is the correct report
the parts under WAREHOUSE 3? listing only the column DESCRIPTION,
SELECT CLASS, WAREHOUSE FROM CLASS and PRICE of all PARTS where class
PARTS WHERE WAREHOUSE = 3; is not equal to AP.
Security is one of the characteristic of Which of the following is not part of handling
database that includes also the protection of data?
the database from unauthorized access
confidentiality and unauthorized changes. Semi-Computerized
False
Which of the following is not part of advantage
of database?
Which of the following is not considered as Database instance
advantage and disadvantage of database?
Transaction
Which of the following is not the main focus
oracle enterprise 11g?
Suppose that the user wanted to add a new Oracle architecture
column name as CUST_NAME data type char
size 6. What is the correct type of statement to
use?
Which of the following is not part of
INSERT disadvantage of database?
Data integrity
Data impendence
True
Which of the following is not part of DML
statement?
Tuple
Database Architecture is the overall design of Suppose that the user wanted to add a new
the database column name as CUST_NAME data type char
size 6. What is the correct SQL statement to
False use?