CS351 - Quizes PDF

Title CS351 - Quizes
Author PAUL VINCENT FAJARDO
Course Database Management System
Institution AMA Computer University
Pages 14
File Size 390.3 KB
File Type PDF
Total Downloads 95
Total Views 173

Summary

It is a bundle of actions which are done within a database to bring it from one consistent state to a new consistent state.TransactionIt is a unit of data – is a symbol or a set of symbols which is used to represent something.datumThe overall design of the database is called thedatabase schemaIs the...


Description

It is a bundle of actions which are done within a database to bring it from one consistent state to a new consistent state.

Are said to exhibit physical data independence if they do not depend on the physical schema.

Transaction

Application programs

It is a unit of data – is a symbol or a set of symbols which is used to represent something.

It is the term generally used to describe what was done by large mainframe computers from the late 1940's until the early 1980's.

datum

Data Processing

The overall design of the database is called the

It is a collection of interrelated data and a set of programs to access those data.

database schema

database-management system (DBMS)

Is the underlying the structure of a database.

It is the collection of information stored in the database at a particular moment is called

data models The overall logical structure schema of a database can be expressed graphically by an

E-R diagram This describes the database design at the physical level.

physical schema It is an association among several entities.

instance of the database This describes the database design at the logical level.

logical schema It is collection of data that contains information relevant to an enterprise.

Database

relationship

It is the collection of basic objects.

This is formed by one or more than one attributes.

Entities

identifier Are applied to the table and form the logical schema.

Constraints It is design to manage large bodies of information.

Database systems This is also known as facts that can be recorded and that have implicit meaning.

Data

This is a characteristic of database that includes also the protection of the database from unauthorized access confidentiality and unauthorized changes.

Data Integrity It is an interpreted data – data supplied with semantics.

Information

He proposed the relational model for database systems in 1970.

An alter statement that is used to add new column to the table.

Dr. E.F Codd

ADD

It is a collection of relations or twodimensional tables controlled by the Oracle server.

An alter statement that is used to delete an existing column in the table. DROP

Relational database

Which of the following is not part of transaction control?

A statement that is use to rename the table or change the existing name of the table. Rename

CREATE

Which of the following is not part of data manipulation language?

Basic unit of storage composed of rows and columns Table

Alter

Which of the following is not part of data control language?

Which of the following is not true about ALTER statement? Define a default value for the new column

Insert

An alter statement that is used to update an existing column datatype or datatype size. MODIFY

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? ALTER TABLE STUDENTS ADD CITY CHAR(10);

Which of the following datatype is not being used in oracle? NUMBER

It logically represents subsets of data from one or more table. View

Suppose that a user wanted to change the datatype of column ADDRESS from Varchar to Char which of the following is the correct example. ALTER STUDENTS MODIFY ADDRESS VARCHAR(20);

Which of the following is the correct example of dropping the table EMPLOYEES? DROP TABLE EMPLOYEES;

Which of the following is the correct example of modifying the column lastname? Change the datatype size to 20. ALTER TABLE EMPLOYEES

Which of the following is the correct example of removing a column FIRSTNAME from EMPLOYEES table?

MODIFY LASTNAME VARCHAR(20);

ALTER TABLE EMPLOYEES

Which of the following is the correct example of truncating the table EMPLOYEES?

DROP COLUMN FIRSTNAME;

TRUNCATE TABLE EMPLOYEES;

Which of the following is the correct example of modifying the column JOB_ID? Change the datatype size to 10.

Which of the following is the correct example of renaming the table EMPLOYEES to WORKERS?

ALTER TABLE EMPLOYEES

RENAME EMPLOYEES TO WORKERS;

MODIFY JOB_ID CHAR(10);

Which of the following is the correct example of adding a new column ADDRESS datatypevarchar size 20 to EMPLOYEES table? ALTER TABLE EMPLOYEES ADD COLUMN ADDRESS VARCHAR(20);

Which of the following is the correct example of creating a new table STUDENTS? The column STUD_ID is set to primary key. CREATE TABLE STUDENTS( STUD_ID NUMBER(3) PRIMARY KEY);

Which of the following is the correct example of adding a new column CONTACT_NOdatatypeNUMBER size 11 to EMPLOYEES table? ADD COLUMN CONTACT_NO NUMBER(11);

Which of the following is the correct example of removing a column SALARY from EMPLOYEES table? ALTER TABLE EMPLOYEES DROP COLUMN SALARY;

Suppose that a user wanted to insert a new value using the implicit method which of the following is the correct example.

Suppose that a user uses the DELETE statement as shown below: what is/are the possible output.

INSERT INTO STUDENST(USN_ID, FIRSTNAME) VALUES(10,’ELENA’)

0 rows are deleted.

A type of insert statement that specify the NULL keyword in the VALUES clause. Explicit

Consists of a collection of DML statements that form a logical unit of work. Transaction

Suppose that a user wanted to insert a new value using the explicit method which of the following is the correct example. INSERT INTO STUDENTS VALUES (10, NULL,’ELENA’,NULL);

A type of DML statement that is use to update existing rows in a table. UPDATE

A type of DML statement that is use to remove existing rows in a table. DELETE

A type of insert statement that omit the column from the column list. Implicit

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. UPDATE STUDENTS SET LASTNAME = ‘SANTOS’, YR_LVL = ‘IRREG’ WHERE USN_ID = 50;

A type of DML statement that is use to add new rows in a table. INSERT

Which of the following is the correct example of deleting a student record from STUDENTS table whose COURSE is equal to NULL;

Which of the following is the correct example updating all student COURSE to ‘BSIT’ from STUDENTS table?

DELETE FROM STUDENTS

UPDATE TABLE STUDENTS

WHERE COURSE = ‘NULL’;

SET COURSE = ‘BSIT’;

Which of the following is the correct example of inserting new values to STUDENTS table where the course is set to NULL;

Which of the following is the correct example of deleting all records in STUDENTS table; DELETE FROM STUDENTS;

INSERT INTO STUDENTS VALUES(1,'DELA CRUZ','JUANITO',NULL);

Which of the following is the correct example of updating the COURSE to ‘N/A’ of all students from STUDENTS table whose course IS NULL; UPDATE TABLE STUDENTS SET COURSE = ‘N/A’

Which of the following is the correct example inserting a new value to STUDENTS table that will only add new data to STUD_ID and LASTNAME? The stud_id is 10 and lastname is 'CRUZ' and the rest of the column is set to NULL. INSERT INTO STUDENTS VALUES (10,'CRUZ',NULL,NULL);

WHERE COURSE IS NULL;

Which of the following is the correct example updating the student LASTNAME TO ‘SANTOS’ and course to ‘BSCS’ whose STUD_ID is equal to 109? UPDATE TABLE EMPLOYEES

Which of the following is the correct example inserting a new value to STUDENTS table that will only add new data to STUD_ID and LASTNAME? The stud_id is 10 and lastname is ‘CRUZ’ INSERT INTO STUDENTS(STUD_ID,LASTNAME)

SET LASTNAME = ‘SANTOS’, COURSE = ‘BSCS’

VALUES(10,’CRUZ’);

WHERE STUD_ID = 109;

Which of the following is the correct example of inserting new values to STUDENTS table?

Which of the following is the correct example of updating the LASTNAME to ‘REYES’ of all students from STUDENTS table whose STUD_ID is equal to 01020564?

INSERT INTO STUDENTS VALUES(1,'DELA CRUZ','JUANITO','BSIT');

UPDATE TABLE STUDENTS SET LASTNAME = ‘REYES’ WHERE STUD_ID = 01020564;

A system used to concatenate one column to another column. ||

It is a value that is unavailable, unassigned, unknown, or inapplicable. NULL

It is a character, a number, or a date that is included in the SELECT statement. Literal

Supposed that the user uses the ff SELECT statement: what will be the possible output. Error because of missing “” mark.

This is used to selects the rows in a table that are returned by a query. Various criteria can be used to restrict the rows that are retrieved. Selection

This character is used to override the default precedence or to clarify the statement. ()

This is used to brings together data that is stored in different tables by specifying the link between them. Joins

Which of the following is not true about writing SQL statements? Indents should be used to make code more readable.

This is use to create expression with number and date values. Arithmetic expression

This is use to Selects the columns in a table that are returned by a query. Selects a few or as many of the columns as required. Projection

Which of the following SELECT statement is the correct PL/SQL that will display all rows and columns? SELECT * FROM PARTS;

Which of the following SELECT statement is the correct PL/SQL that will displayeliminate the duplicate rows for column class and warehouse. SELECT DISTINCT CLASS, WAREHOUSE FROM PARTS;

Which of the following SELECT statement is the correct PL/SQL that willcreate a report specifying only the column PRICE, ONHAND and DESCRIPTION? SELECT PRICE, ONHAND, DESCRIPTION FROM PARTS;

Which of the following SELECT statement is the correct PL/SQL that willcreate a report that will add 10% increase in PRICE? List only the column DESCRIPTION, CLASS and PRICE.

Which of the following SELECT statement is the correctreport that will rename the column DESCRIPTION to TITLE, PARTNUM to ID and ONHAND to STOCK?SELECT DESCRIPTION AS ‘TITLE’, PARTNUM AS ‘ID’, ONHAND AS ‘STOCK’ FROM PARTS;

Which of the following SELECT statement is the correctreport the will merge the column CLASS and PRICE rename the COLUMN as “CLASS PRICE”. SELECT (CLASS||PRICE) AS “CLASS PRICE” FROM PARTS;

Which of the following SELECT statement is the correctreport that will combine the column PARTNUM and DESCRIPTION put a literal character string “belongs to” in between the two columns then rename the column as “NUMBER TITLE”. Note put space before and after the character literal string to avoid no spaces in the report. SELECT (PARTNUM||’ THAT BELONGS TO ’||DESCRIPTION) AS “NUMBER TITLE” FROM PARTS;

SELECT PRICE*0.10, DESCRIPTION, CLASS FROM PARTS;

Which of the following SELECT statement is the correct report that will deduct 5 from ONHAND, multiply 5 in WAREHOUSE, after getting the value on both ONHAND and WAREHOUSE add their data: as shown below: ONHAND - 5 + 5 * WAREHOUSE Note that you have to force the Oracle to prioritize first the Subtraction over Multiplication. List only the column DESCRIPTION, ONHAND and WAREHOUSE. SELECT ONHAND-5 + 5 * WAREHOUSE, DESCRIPTION FROM PARTS;

Which of the following SELECT statement is the correctreport that will display the unique value for WAREHOUSE renames the column as “No. of Available Warehouse”. SELECT DISTINCT WAREHOUSE AS “No. of available warehouse” FROM PARTS;

Which of the following is the correct report that will display the CLASS from table PARTS. SELECT * CLASS FROM PARTS;

True/False Character values are format sensitive and date values are case sensitivesensitive.

This is used to in conditions that compare one expression with another value or expression. Comparison

False

This is used to perform wildcard searches of valid search string values.

Character strings and date values are enclosed with double quotation marks.

False

Like

This is used to restrict the rows that are returned by a query. Where

This symbol % denotes zero or many character

True

This is used to test for values in a specified set of values. IN

This is used to display rows based on a range of values. Between

A null value means that the value is unavailable, unassigned, unknown, or inapplicable.

True

The != not equal to symbol is also equal to this symbol.

True

Which of the following is the correct report that will display the DESCRIPTION, WAREHOUSE AND distinct value for CLASS. SELECT DESCRIPTION, WAREHOUSE, DISTINCT ‘CLASS ‘ FROM PARTS;

Which of the following is the correct report showing all rows and columns sort the description in ascending order. SELECT * FROM PARTS ORDER BY DESCRIPTION ASC;

Which of the following is the correct report listing only the column PARTNUM, CLASS and ONHAND of all parts where partnum is equal to AT94, DR93 and KV29. (Note 1 query only and do not use logical condition) SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM IN (‘AT94’,’DR93’,’KV29’);

Which of the following is the correct report that will merge the column DESCRIPTION and PRICE put a literal character string of = “ with a price of ” in between the two columns. Limit the rows returned by getting only the partnum that starts with letter ‘K’. SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE PARTNUM LIKE ‘%K’;

Which of the following is the correct report listing only the column DESCRIPTION, PARTNUM, CLASS and PRICE of all parts where the description fourth letter starting from the first is equal to ‘D’. SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE DESCRIPTION LIKE ‘D%’; Which of the following is the correct report listing the column PARTNO, DESCRIPTION and WAREHOUSE. Get only that description that does not ends with ‘ER’. Note that you have to merge the said three columns, rename the merge column as “Parts Record”. Below is the sample output for column. Parts Record AT94is the part number ofIRONwhich belong to warehouse3 SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION || ‘which belongs to’ || WAREHOUSE) FROM PARTS WHERE PARTNUM LIKE ‘%ER’;

Which of the following is the correct report listing only the column DESCRIPTION, WAREHOUSE, CLASS and PRICE of all parts where the description contains keyword ‘SHE’. SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE DESCRIPTION LIKE ‘%SHE%’;

Which of the following is the correct report that will display the distinct value for CLASS and WAREHOUSE limit the rows by getting only the parts under WAREHOUSE 3? SELECT CLASS, WAREHOUSE FROM PARTS WHERE WAREHOUSE = 3;

where ONHAND is greater than or equal to 21. SELECT DESCRIPTION, ONHAND, WAREHOUSE FROM PARTS WHERE ONHAND >=21;

Which of the following is the correct report listing only the column DESCRIPTION, ONHAND, CLASS and PRICE of all price where the description ends with letter ‘N’. SELECT DESCRIPTION, ONHAND, CLASSS FROM PARTS WHERE DESCRIPTION LIKE ‘%N’;

Which of the following is the correct report listing only the column CLASS, DESCRIPTION and PRICE of all PARTS where price range is between 200 to 500. Sort the Price in descending order. SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 200 AND 500;

Which of the following is the correct report that will list only the column DESCRIPTION, PARTNUM, CLASS, and PRICE of all PART whose CLASS is equal to HW. SELECT COLUMN DESCRIPTION, PARTNUM, CLASS, PRICE FROM PARTS WHERE CLASS=’HW’;

Which of the following is the correct report listing only the column DESCRIPTION, CLASS and PRICE of all PARTS where class is not equal to AP. SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE CLASS != AP;

Which of the following is the correct report listing only the column DESCRIPTION, ONHAND and WAREHOUSE of all PARTS

Which of the following is the correct report listing only the column PARTNUM, DESCRIPTION and PRICE of all PARTS where price is less than 500. Sort the PRICE in ascending order. SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE < 500;

Which of the following is the correct report listing the DESCRIPTION and Price (Note that in column PRICE add ADDITIONAL 10000). Get only the prices with no digit that is equal to ‘5’. Note that you have to concatenate the said column and rename the merge column as “New Price Lists”. Sort the data in DESC order by Price. SELECT DESCRIPTION, PRICE + 10000 AS “NEW PRICE LISTS” FROM PARTS ORDER BY PRICE DESC;

Given the output below. Which of the following is the correct PL/SQL to be used

WHERE CLASS = ‘AP’ OR ONHAND BETWEEEN 8 AND 12

SELECT WAREHOUSE, CLASS FROM PARTS WHERE CLASS IN (‘AP’,’SG’,’HW’); SELECT DESCRIPTION, ONHAND,CLASS FROM PARTS WHERE CLASS = ‘HW’;

Given the output below. Which of the following is the correct PL/SQL to be used? SELECT * FROM PARTS;

Given the output below. Which of the following is the correct PL/SQL to be used? WHERE CLASS = ‘AP’ OR ONHAND BETWEEN 8 AND 12;

WHERE DESCRIPTION LIKE ‘%R’;

SELECT (PARTNUM|| ‘belong to’|| DESCRIPTION) FROM PARTS WHERE PARTNUM IN (‘BV06,’KV29’)

WHERE DESCRIPTION LIKE ‘%L’; Given the output below. Which of the following is the correct PL/SQL to be used? SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS WHERE WAREHOUSE >=1; SELECT DESCRIPTION, PRICE *.5 +PRICE100 FROM PARTS WHERE PRICE >10000;

Security is one of the characteristic of database that includes also the protection of the database from unauthorized access confidentiality and unauthorized changes.

Which of the following is not part of handling data? Semi-Computerized

False Which of the following is not part of advantage of database? Which of the following is not considered as advantage and disadvantage of database?

Database instance

Transaction Which of the following is not the main focus oracle enterprise 11g? Suppose that the user wanted to add a new column name as CUST_NAME data type char size 6. What is the correct type of statement to use? INSERT

Oracle architecture

Which of the following is not part of disadvantage of database? Data integrity

Which of the following is not part of basic SELECT statement Alias

Which of the following is not a characteristic of database? Data impendence

Which of the following is not part of characteristics of database? Data Processing

Which of the following is not part of DML statement?

Database Management System is a collection of interrelated data and a set of programs to access those data.

True

MERGER

Which of the following is not part of other Comparison Operator?

Which of the following is not part of common Comparison operator?

IS NUL

!

Which of the following...


Similar Free PDFs