0% found this document useful (0 votes)
39 views9 pages

Database Management System 1 Oracle

Data Structure and Algo Prelim to Finals Main Compress 2Data Structure and Algo Prelim to Finals Main Compress 2

Uploaded by

TREMsZ GAMING
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views9 pages

Database Management System 1 Oracle

Data Structure and Algo Prelim to Finals Main Compress 2Data Structure and Algo Prelim to Finals Main Compress 2

Uploaded by

TREMsZ GAMING
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Which of the following is the correct example of

TRUNCATE TABLE EMPLOYEES;


truncating the table EMPLOYEES?
SELECT COUNT(JOB_ID), AS “TOTAL NO. OF If the elements of the set cannot be counted or
ST_CLERK” enumerated, then the set is said to be?
Entities It is the collection of basic objects.
Find the value of n so that the expression is a perfect
n = 36; (j - 6) square trinomial and then factor the trinomial.
j2-12j+n
Tuples This is formed by one or more than one attributes.
True/False. Character strings and date values are
FALSE
enclosed with double quotation marks.
|E| ≥ |V| A tree is not a tree if it has?
It is the collection of information stored in the
Instance of the database
database at a particular moment is called
Which of the following is the correct example of
adding a new column
ALTER TABLE EMPLOYEES
CONTACT_NOdatatypeNUMBER size 11 to
EMPLOYEES table?
{-16/3} 4/x + 5/2 = 7/4
It is the term generally used to describe what was
Data Processing done by large mainframe computers from the late
1940's until the early 1980's.
Choose the letter of the correct answer based on the
SELECT MIN(FIRSTNAME||LASTNAME)
table EMPLOYEES as shown below.
This is used to in conditions that compare one
Comparison
expression with another value or expression.
SELECT MAX(LASTNAME||FIRSTNAME) AS
Choose the letter of the correct answer based on the
"EMPLOYEES NAME", JOB_ID,
table EMPLOYEES as shown below.
COUNT(JOB_ID)
Which of the following is the correct example of
RENAME EMPLOYEES TO WORKERS;
renaming the table EMPLOYEES to WORKERS?
The Gilas Pilipinas Basketball Team has 10 players.
252 How many ways can the coach select 5 players to
start the game?
The elements of a set must be distinct, ordered and
FALSE
well-defined?
W = 4L - 7 Solve the Problem
Which of the following is the correct example of
DROP TABLE EMPLOYEES;
dropping the table EMPLOYEES?
Choose the letter of the correct answer based on the
SELECT TRIM('A' FROM LASTNAME)
table EMPLOYEES as shown below.
How many edges can fully connect a graph with 4
6
vertices?
It is a collection of relations or two-dimensional
Relational database
tables controlled by the Oracle server.
SUBSTR Extracts a string of determined length.
SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS Choose the letter of the correct answer based on the
"EMPLOYEES AND THEIR SALARIES" table EMPLOYEES as shown below.
Refer to table 1.0 Using the SELECT statement
0 rows selected / no rows selected
below what would be the possible output:
Given the output below. Which of the following is the
SELECT * FROM PARTS;
correct PL/SQL to be used?
SELECT DISTINCT WAREHOUSE, Given the output below. Which of the following is the
CLASS FROM PARTS; correct PL/SQL to be used?
Database schema The overall design of the database is called the
He proposed the relational model for database
Dr. E.F Codd
systems in 1970.
Table Basic unit of storage composed of rows and columns
SELECT (FIRSTNAME || 'SALARY OF' ||
SALARY || 'IF MULITPLY BY TWO THEN
Choose the letter of the correct answer based on the
HE/SHE WLL GOT A NEW SALARY OF' ||
table EMPLOYEES as shown below.
SALARY * 2)AS INCREASE FROM
EMPLOYEES WHERE LASTNAME LIKE '%N';
This is use to accept character input and can return
Character function
both character and number values.
16x - 20 4(2x - 5) + 8x
Solve for the indicated variable.
1.5
10b - 15 =
{-1} -5(2y + 3) + 5 = 0
This is used to selects the rows in a table that are
Selection returned by a query. Various criteria can be used to
restrict the rows that are retrieved.
It is the study of the methods and principles used to
Logic distinguish good (correct) from bad(incorrect)
reasoning?
The product of two consecutive positive even
10 and 12
integers is 120. Find the integers.
SELECT MIN(LASTNAME), JOB_ID, Which of the following query is correct which will
MAX(SALARY) display the same output as shown below?
Based on the given table Stocks type the possible
out if the following sql statement is executed.
ZONROX
SELECT MAX(NAME)
FROM STOCKS;
It is a character, a number, or a date that is included
Literal
in the SELECT statement.
It is defined to be the product of all the integers from
Factorial
1 to n and is denoted n!?
How many bit strings of length 4 contain either 3
6
consecutive 0s or 3 consecutive 1s?
This is use to create expression with number and
Arithmetic expression
date values.
0 Infinite
SELECT
Choose the letter of the correct answer based on the
CONCAT(DEPARTMENT_ID,JOB_ID),MIN(SALA
table EMPLOYEES as shown below.
RY), MAX(SALARY)
Database instance Which of the following is not part of advantage of
database?
A type of DML statement that is use to remove
DELETE
existing rows in a table.
What is the maximum on hand from parts when this
50Mark 0.00 out of 1.00
SQL statement is executed?
What is the return value if the user try to do the
0 following:
SELECT TRUNC (65.73,-2) FROM DUAL;
The overall logical structure schema of a database
ER Diagram
can be expressed graphically by an .
If there are 20 girls and 10 boys in the class and you
30 want to speak to one student of theclass. How many
choices do you have?
True/False. The != not equal to symbol is also equal
TRUE
to this symbol<>.
True/False. This symbol % denotes zero or many
TRUE
characters.
A type of insert statement that specify the NULL
Explicit
keyword in the VALUES clause.
A type of DML statement that is use to update
UPDATE
existing rows in a table.
Supposed that the user uses the ff SELECT
Error because of missing “” mark.
statement: what will be the possible output.
Choose the letter of the correct answer based on the
SELECT MIN(LASTNAME), AVG(SALARY)
table EMPLOYEES as shown below.
True/False. A null value means that the value is
TRUE
unavailable, unassigned, unknown, or inapplicable.
Vowel Letters A = {a, e, i, o, u} is a set of?
Root It is a vertex distinguishable from other vertex?
720 If A=6!, then A is equal to?
True/False Character values are format sensitive
FALSE
and date values are case sensitive-sensitive.
Given a graph with V = {a, b, c, d}, and E = {(a, b),
2 (a, c), (b, c) (c, d), (b, d)}, how manyedges should be
deleted to create a spanning tree?
It refers to the number of ways in which a subset of
Combination objects can be selected from a given set of objects,
where order is not important?
It refers to statement being supported in the
Conclusion
argument?
Solve the inequality. Solve for x.
x<2
x+3<5
SELECT LPAD(SALARY,15,'$'), Choose the letter of the correct answer based on the
RPAD(SALARY,10,'@') table EMPLOYEES as shown below.
y= -3x-13
{(-5, 2)}
4x+3y= -14
-3 Solve for the indicated variable. 7x + 21
Between This is used to display rows based on a range of
values.
This is used to test for values in a specified set of
IN
values.
A tool rental store charges a flat fee of $10.00 to rent
a chain saw, and $4.25 for each day, including the
y = 4.25x + 10.00
first. Write an equation that expresses the cost y of
renting this saw if it is rented for x days.
Isolated Refers to a vertex on which no edges are incident?
SELECT (PARTNUM|| ‘belong to’||
Given the output below. Which of the following is the
DESCRIPTION) FROM PARTS WHERE CLASS
correct PL/SQL to be used?
= ‘SG’;
It is the number of edges along the unique path
Level
between it and the root?
SELECT MIN(LASTNAME||FIRSTNAME) AS Which of the following query is correct which will
NAME, DEPARTMENT_ID display the same output as shown below?
Constraints Are applied to the table and form the logical schema.
SELECT DESCRIPTION, PRICE *.5 +PRICE- Given the output below. Which of the following is the
100 FROM PARTS WHERE PRICE >10000; correct PL/SQL to be used?
This character is used to override the default
egg
precedence or to clarify the statement.
An alter statement that is used to add new column to
ADD
the table.
Set It is a collection of objects called elements?
It is collection of data that contains information
Database
relevant to an enterprise.
This describes the database design at the logical
Logical schema
level.
Given the output below. Which of the following is the
SELECT DESCRIPTION, ONHAND, CLASS
correct PL/SQL to be used?
It is a set representation where all the elements in
Tabular the set are all listed separated by commas and
enclosed within braces or curly brackets?
12 If f:A->A, and f(A)=3x, then f(4)?
1.5 10b - 15 =
Relationship It is an association among several entities.
This describes the database design at the physical
Physical schema
level.
Choose the letter of the correct answer based on the
SELECT MIN(LASTNAME) FROM EMPLOYEES;
table EMPLOYEES as shown below.
The width of a rectangle is 7 ft less than 4 times the
W = 4L - 7 length. Write a model for the width W in terms of the
length L.
Based on the given table Stocks type the possible
out if the following sql statement is executed.
3
SELECT COUNT(PRICE)
FROM STOCKS;
ALTER TABLE EMPLOYEES Which of the following is the correct example of
modifying the column JOB_ID? Change the datatype
size to 10.
Given the output below. Which of the following is the
SELECT DESCRIPTION, ONHAND,CLASS
correct PL/SQL to be used?
It logically represents subsets of data from one or
View
more table.
What is the round of value of 78.90 when this SQL
8.9Mark 0.00 out of 1.00
statement is executed?
A tree traversal where the left subtree is visited first,
Inorder
followed by the root, then the right subtree?
It exists if and only if the two propositions have
None of the Choices identical truth values for each possible substitution of
propositions for their proposition variable?
Siblings Vertices with the same parent are called?
Which of the following is not part of transaction
CREATE
control?
SELECT DISTINCT(JOB_ID), COUNT(JOB_ID)
AS “NO. OF JOB_ID”, SUM(SALARY) AS
Choose the letter of the correct answer based on the
“TOTAL SALARY”, AVG(SALARY) AS
table EMPLOYEES as shown below.
“AVERAGE SALARY” FROM
EMPLOYEES GROUP BY JOB_ID;
It is use to accept numeric input and return numeric
Number function
values.
Refer to table 1.0, suppose that user insert the
following values using the statement below what
The ORG and POSITION of YAMBAO will
would be the possible output? INSERT INTO
automatically sets to NULL.
ORGCHART VALUES (11,’YAMBAO,JUN’, NULL,
NULL);
King,StevenHunold,AlexanderErnst,BruceLorentz, Choose the letter of the correct answer based on the
Diana table EMPLOYEES as shown below.
What is the minimum warehouse from parts when
1Mark 0.00 out of 1.00
this SQL statement is executed?
x-2 Simplify the rational expression.
It takes Terrell 65 minutes to weed his garden if he
does it every 2 weeks, while his wife can get it done
26.6 minutes
in 45 minutes.  How long would it take them working
together?  Round to the nearest tenth of a minute.
What is the character position of ‘O’ of the
5Mark 0.00 out of 1.00 description Microware Oven from parts when this
SQL statement is executed?
Simplify the rational expression
1/4x
4x / (16x^2)
What is the length of description Cordless Drill from
14Mark 0.00 out of 1.00
parts when this SQL statement is executed?
In a graph, let V = {v1, v2, v3}, and E = {e1, e2, e3},
assuming the endpoints of e1 are v1and v2, the
v1 endpoints of e2 are v1 and v3, the endpoints of e3
are v2 and v3. Then e1 and e2 are incident on what
vertex in the graph?
Projection 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.
SELECT DISTINCT WAREHOUSE FROM Given the output below. Which of the following is the
PARTS; correct PL/SQL to be used
A computer password consists of a letter of the
SELECT MAX(SALARY) FROM EMPLOYEES;
alphabet followed by three digits. Find
Suppose that a user wanted to change the datatype
ALTER TABLE STUDENTS
of column ADDRESS from Varchar to Char which of
MODIFY ADDRESS VARCHAR(20);
the following is the correct example.
Two dice are thrown. How many possible outcomes
36
are there?
An alter statement that is used to update an existing
MODIFY
column datatype or datatype size.
Suppose that the user wanted to add a new column
ALTER TABLE PARTSADD CUST_NAME
name as CUST_NAME data type char size 6. What
CHAR(6);
is the correct SQL statement to use?
INSERT INTO STUDENST(USN_ID, Suppose that a user wanted to insert a new value
FIRSTNAME) using the implicit method which of the following is the
VALUES(10,’ELENA’) correct example.
SELECT COUNT(MANAGER_ID) AS "NO. OF Which of the following query is correct which will
MANAGER_ID" FROM EMPLOYEES; display the same output as shown below?
This is used to perform wildcard searches of valid
Like
search string values.
Solve for the indicated variable.
1
4a - 4
How many warehouse are there when this SQL
10Mark 0.00 out of 1.00
statement is executed?
It is a value that is unavailable, unassigned,
NULL
unknown, or inapplicable.
It is a collection of interrelated data and a set of
Database Management System
programs to access those data.
Which of the following is not true about writing SQL
SQL statements are not case sensitive.
statements?
Domain of f If f : A —> B , then A is called?
A computer password consists of a letter of the
26000 alphabet followed by three digits. Find the total
number of passwords that can be created.
Trims leading or trailing characters (or both) from a
Trim
character string.
It is a table that is owned by the user SYS and can
Dual
be accessed by all users.
It is the study of the methods and principles used to
Logic
distinguish good (correct) from bad
SELECT FIRSTNAME, LENGTH(FIRSTNAME) Choose the letter of the correct answer based on the
AS "NUMBER OF CHARACTER" table EMPLOYEES as shown below.
It is the Law of Aristotelian Logic which states that
Law of Non-contradiction
“No Statement is both true and false”?
Multiple row It refers to the number of ways in which a subset of
objects can be selected from a given
Choose the letter of the correct answer based on the
SELECT JOB_ID FROM EMPLOYEES
table EMPLOYEES as shown below.
Tree It is a connected graph that contains no cycles?
It is a unit of data – is a symbol or a set of symbols
Datum
which is used to represent something.
The cost C (in $) for tuition and fees for x credit-
hours at City College is given by
17 credit-hours
If a student spends $3267.00 for his classes, how
many credit-hours did he take?
Data Model Is the underlying the structure of a database.
SELECT JOB_ID, COUNT(JOB_ID)"NO. OF Which of the following query is correct which will
JOB_ID", SUM(SALARY), AVG(SALARY) display the same output as shown below?
Based on the given table Stocks type the possible
out if the following sql statement is executed.
8.22
SELECT AVG(NVL(QTY,0))
FROM STOCKS;
What is the round of value of 78.90 when this SQL
100Mark 0.00 out of 1.00
statement is executed?
A statement that is use to rename the table or
Rename
change the existing name of the table.
This is also known as facts that can be recorded and
Data
that have implicit meaning.
It is an interpreted data – data supplied with
Information
semantics.
How many warehouse are there when this SQL
3Mark 0.00 out of 1.00
statement is executed?
Which of the following is the correct example
UPDATE STUDENTS updating all student COURSE to ‘BSIT’ from
STUDENTS table?
It consists of two finite sets, a nonempty set V(G) of
Graph
vertices and a set E(G) of edges?
{-38/3} (3/2)y + 18 = -1
This is a characteristic of database that includes also
Data integrity the protection of the database from unauthorized
access confidentiality and unauthorized changes.
This is used to converts the first letter of each word
INITCAT
to uppercase and the remaining letters to lowercase.
SELECT LOWER(LASTNAME||','||FIRSTNAME) Choose the letter of the correct answer based on the
AS "COMPLETE NAME", table EMPLOYEES as shown below.
This is used to restrict the rows that are returned by
Where
a query.
MOURGOS                      MOURGOS    50       
Let A = {1, 2, 3, 4} and B = {x, y, z}, if f:A—>
100
It is a bundle of actions which are done within a
Transaction database to bring it from one consistent state to a
new consistent state.
Which of the following is the correct example
INSERT INTO inserting a new value to STUDENTS table that will
STUDENTS(STUD_ID,LASTNAME) only add new data to STUD_ID and LASTNAME?
The stud_id is 10 and lastname is ‘CRUZ’
SELECT MAX(LASTNAME||','||FIRSTNAME) AS Which of the following query is correct which will
NAME, MAX(SALARY) display the same output as shown below?

What is the truncated value of 78.90 when this SQL


0Mark 0.00 out of 1.00
statement is executed?
Height It is the maximum level of any vertex of the tree?
For the right triangle shown, the lengths of two sides
5√5, 3√5 are given. Find the third side. Leave your answer in
simplified, radical form. a = 5, b = 10, c =
Which of the following is the correct example of
CREATE TABLE STUDENTS( STUD_ID
creating a new table STUDENTS? The column
NUMBER(3) PRIMARY KEY);
STUD_ID is set to primary key.
Contradiction It is the negation of Tautology?
A system used to concatenate one column to
||
another column.
Refers to the sum of the indegree and outdegree of
Degree
the graph?
SELECT (FIRSTNAME||' EARNS '|| SALARY || Choose the letter of the correct answer based on the
'MONTHLY BUT WANTS' || SALARY * 3) table EMPLOYEES as shown below.
It is a type of function that is both one-to-one and
Bijection
onto?
ABELELLEN                 
SA_REPTALORJONATHAN       Choose the letter of the correct answer based on the
SA_REPGRANTKIMBERLY       table EMPLOYEES as shown below.
SA_REPFAYPAT                         MK_REP
SELECT MAX(FIRSTNAME), MANAGER_ID, Which of the following query is correct which will
COUNT(SALARY), AVG(SALARY) display the same output as shown below?
SELECT DISTICT(JOB_ID), COUNT(JOB_ID) AS Choose the letter of the correct answer based on the
“TOTAL NUMBER OF JOB_ID” table EMPLOYEES as shown below.
Which of the following is not part of data control
Insert
language?
1 Multiple Choice;
The width of a rectangle is fixed at 50cm , and the
80 cm perimeter can be no greater than 260cm . Find the
maximum length of the rectangle.
Choose the letter of the correct answer based on the
500
table EMPLOYEES as shown below.
Which of the following is the correct example
UPDATE EMPLOYEES updating the student LASTNAME TO ‘SANTOS’ and
course to ‘BSCS’ whose STUD_ID is equal to 109?
This is used to brings together data that is stored in
Joins
different tables by specifying the link between them.
SELECT
Which of the following query is correct which will
MIN(LASTNAME),MAX(FIRSTNAME),SUM(SALA
display the same output as shown below?
RY),AVG(SALARY)
Consists of a collection of DML statements that form
Transaction
a logical unit of work.
Which of the following is the correct example of
updating the LASTNAME to ‘REYES’ of all students
UPDATE STUDENTS
from STUDENTS table whose STUD_ID is equal to
01020564?
Which of the following is not part of data
Alter
manipulation language?
Suppose that a user wanted to update the lastname
UPDATE STUDENTS
of student to ‘Santos’ and YR_LVL to ‘Irreg’ whose
SET LASTNAME = ‘SANTOS’, YR_LVL =
USN_ID is equal to 50, in one select statement
‘IRREG’
which of the following is the correct sql statement to
WHERE USN_ID = 50;
use.
Which of the following is the correct example of
ALTER TABLE EMPLOYEES removing a column FIRSTNAME from EMPLOYEES
table?
Which of the following is the correct example of
ALTER TABLE EMPLOYEES modifying the column lastname? Change the
datatype size to 20.
Finite Objects that can be counted are called?
It is a tree in which there is one vertex that is
Rooted Tree
distinguished from the others?
Let A = {1, 2, 3, 4} and B = {x, y, z}, if f:A—>B, then
{1,2,3,4}
the domain of f is?
8 and -9 Solve the Problem
If the elements of the set cannot be counted or
Infinite Set
enumerated, then the set is said to be?
Identity 3( + 2) - 4 = 2 + 4
It refers to the number of ways in which a subset of
Permutation objects can be selected from a given set of objects,
where order is important?
Choose the letter of the correct answer based on the
0
table EMPLOYEES as shown below.
MOURGOS                      MOURGOS    50        Choose the letter of the correct answer based on the
100 table EMPLOYEES as shown below.
SELECT COUNT(JOB_ID), AS “TOTAL NO. OF Choose the letter of the correct answer based on the
ST_CLERK” table EMPLOYEES as shown below.
Multiple row This is use to return one result per group of row.
Choose the letter of the correct answer based on the
SELECT MAX(SALARY) FROM EMPLOYEES;
table EMPLOYEES as shown below.
SELECT MAX(LASTNAME||FIRSTNAME) AS
"EMPLOYEES NAME", JOB_ID,
COUNT(JOB_ID)
Choose the letter of the correct answer based on the
FROM EMPLOYEES
table EMPLOYEES as shown below.
WHERE LASTNAME LIKE '%N'
GROUP BY JOB_ID
HAVING AVG(SALARY)>10000;

You might also like