Professional Documents
Culture Documents
Database MGT System 1 Not All Correct
Database MGT System 1 Not All Correct
Database MGT System 1 Not All Correct
The overall logical structure schema of a database can be expressed graphically by an=
E-R diagram
This is also known as facts that can be recorded and that have implicit meaning.=
Data
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.=
Data Processing
This is a characteristic of database that includes also the protection of the database from
unauthorized access confidentiality and unauthorized changes.=
Data Integrity
An alter statement that is used to update an existing column datatype or datatype size.=
MODIFY
A statement that is use to rename the table or change the existing name of the table.=
Rename
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);
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 removing a column FIRSTNAME from
EMPLOYEES table?=
ALTER TABLE EMPLOYEES
Which of the following is the correct example of modifying the column JOB_ID? Change the
datatype size to 10.
ALTER TABLE EMPLOYEES
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 modifying the column lastname? Change
the datatype size to 20.=
ALTER TABLE EMPLOYEES
MODIFY LASTNAME VARCHAR(20);
Which of the following is the correct example of truncating the table EMPLOYEES?=
TRUNCATE TABLE EMPLOYEES;
Which of the following is the correct example of renaming the table EMPLOYEES to WORKERS?=
RENAME EMPLOYEES TO WORKERS;
Which of the following is the correct example of removing a column SALARY from EMPLOYEES
table?=
ALTER TABLE EMPLOYEES
DROP COLUMN SALARY;
A type of insert statement that specify the NULL keyword in the VALUES clause.=
Explicit
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;
Suppose that a user uses the DELETE statement as shown below: what is/are the possible
output.=
0 rows are deleted.
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);
Which of the following is the correct example of deleting a student record from STUDENTS table
whose COURSE is equal to NULL;=
DELETE FROM STUDENTS
WHERE COURSE = ‘NULL’;
Which of the following is the correct example of inserting new values to STUDENTS table
where the course is set to NULL;=
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
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 of updating the LASTNAME to ‘REYES’ of all
students from STUDENTS table whose STUD_ID is equal to 01020564?=
UPDATE TABLE STUDENTS
SET LASTNAME = ‘REYES’
Which of the following is the correct example updating all student COURSE to ‘BSIT’ from
STUDENTS table?=
UPDATE TABLE STUDENTS
Which of the following is the correct example of deleting all records in STUDENTS table;
DELETE FROM STUDENTS;
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);
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)
VALUES(10,’CRUZ’);
Which of the following is the correct example of inserting new values to STUDENTS table?=
INSERT INTO STUDENTS VALUES(1,'DELA
CRUZ','JUANITO','BSIT');
A system used to
concatenate one column to
another column.
||
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
It is a value that is
unavailable, unassigned,
unknown, or inapplicable.
NULL
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
A system used to concatenate one column to
another column.
||
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
It is a value that is unavailable, unassigned,
unknown, or inapplicable.
NULL
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.
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
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;
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;
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.
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 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;
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;