Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

TSTC ITSE 1345 - Oracle SQL Final Exam Review Newest Edition 2025-2026.Questions & Answers, Exams of Advanced Data Analysis

TSTC ITSE 1345 - Oracle SQL Final Exam Review Newest Edition 2025-2026. Questions & Correct Answers. Graded A

Typology: Exams

2024/2025

Available from 07/05/2025

zaza-maica
zaza-maica ๐Ÿ‡ฌ๐Ÿ‡ง

2.2

(5)

3.3K documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
TSTC ITSE 1345 - Oracle SQL Final Exam
Review Newest Edition 2025-2026.
Questions & Correct Answers. Graded A
_________ and __________ functions are opposites of each other and
provide a value in a group of rows. โ€“ ANS Both MIN and MAX
_________ rows are not allowed in the relational model. โ€“ ANS Orphan
___________ subqueries allow you to reference columns from the outer
query and execute the inner query repeatedly - ANS Correlated
____________ are useful for analyzing and exploring the relationships
within your data - ANS Self-joins
_________________ relationships are always optional relationships. - ANS
Recursive
__________________ inserts the current date and time. - ANS SYSDATE
A _____ is a query definition stored in the database that looks just like a
table, but does not have any physical rows - ANSx
A _________ subquery returns a single column with a single row -
ANSScalar
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download TSTC ITSE 1345 - Oracle SQL Final Exam Review Newest Edition 2025-2026.Questions & Answers and more Exams Advanced Data Analysis in PDF only on Docsity!

TSTC ITSE 1345 - Oracle SQL Final Exam

Review Newest Edition 2025-2026.

Questions & Correct Answers. Graded A

_________ and __________ functions are opposites of each other and provide a value in a group of rows. โ€“ ANS Both MIN and MAX _________ rows are not allowed in the relational model. โ€“ ANS Orphan ___________ subqueries allow you to reference columns from the outer query and execute the inner query repeatedly - ANS Correlated ____________ are useful for analyzing and exploring the relationships within your data - ANS Self-joins _________________ relationships are always optional relationships. - ANS Recursive __________________ inserts the current date and time. - ANS SYSDATE A _____ is a query definition stored in the database that looks just like a table, but does not have any physical rows - ANSx A _________ subquery returns a single column with a single row - ANSScalar

A calculation with a null always yields another null. - ANSTRUE A constraint must have a name in order for it to be disabled. - ANSFALSE A DML command automatically issues a COMMIT. - ANSFALSE A function that operates on a single value can have only one input parameter. - ANSFALSE A join across three tables can be expressed with the ________ join syntax.

  • ANSANSI A space or value of zero is the same as NULL in a schema diagram - ANSFALSE A transaction is a logical unit of work. - ANSTRUE All SQL statements contained within a script must end with a semicolon or forward slash, even if they are done in SQL Developer. - ANSTRUE An outer join includes the result rows returned by an __________ plus extra rows where no matches are found. - ANSEquijoin Another name for a data dictionary view is __________________ or _________________. - ANSstatic or dynamic Checks whether any value in the list makes the condition true. - ANSAny

PAGESIZE - default is 14; when you use the default, you repeat the heading every 14 rows. FEEDBACK - command returns the number of records returned by a query. Explain how Oracle treats locks when a database is being updated and needs to be viewed by other users. - ANSWhen you issue a INSERT, UPDATE, DELETE, or MERGE statement, Oracle automatically locks the modified rows. The lock prevents other sessions from making changes to these rows. The lock is released when the session initiating change commits or rollsback. Explain how Substitution Variables are used when writing scripts. - ANSWhen you want to run the same script repeatedly, but want to be able to change a variable you would use a substitution variable. During the execution of the script the user will be prompted to input the variable to use. Explain how the SPOOL command is used and what program it can be used in. - ANSThe SPOOL command, together with a file name, spools any subsequently issued SQL *Plus or SQL command to a file. Just as with other file names, you can add a path to store the file in a directory other than your SQL *Plus default directory. SQL Developer does not allow for spooling. Explain how you can optimize your queries with subqueries and the main advantage of doing so. - ANSSubqueries allow you to nest multiple queries into each other. This gives you the ability to use one statement to break

down a problem into individual components. Without nesting queries, you would be required to have multiple queries which could be time consuming and difficult to accomplish. With the ability to nest queries you can breakdown results to get the results you were needing in one statement. Explain in detail the impact of INDEXES and how they are used by Oracle.

  • ANSTo achieve good performance for data retrieval and data manipulation statements Oracle uses indexes. In the same way you would use an index in the back of a book to quickly find information, Oracle uses indexes to speed up data retrieval. If the appropriate index does not exist on a table, Oracle needs to examine every row (called a full table scan), which can be time consuming. Explain the differences in how an ANSI Full Outer Join and a Full Outer Join using the UNION Operator work - ANSx Explain the steps needed to run a script in SQL Developer - ANSLoad the file into the SQL Statement Box, by opening the location the file is stored and inserting it into the statement Box. Next you can press the F5 key. Explain what a static data dictionary view is and how it is used - ANSThe static data dictionary stores details about database objects, such as tables, indexes, and views. Whenever a new object is added or an object is changed, data about the object is recorded in the data dictionary.

In a view you can give a column a different name than it has in the parent table. - ANSTRUE In SQL Developer field names and table names are shown in the color _______. - ANSBlack Information that is returned after you run your statement are found in the __________ tab in SQL Developer. - ANSResults Instead of using the Oracle Outer Join Operator or the ANSI syntax, you can achieve the same result with two SQL statements: ____________ and a ____________ - ANSEquijoin and correlated subquery Is The following statement is correct: SELECT * FROM instructor ORDER BY phone - ANSTRUE It is always good practice to include the old values in the WHERE clause of UPDATE to ensure that another session or user has not changed the name in the meantime. - ANSTRUE It is common practice to place a HAVING clause before the GROUP BY clause. - ANSFALSE It is considered good form to put all SQL commands in all caps. - ANSTRUE

It is not possible to limit or disable constraints using Dynamic SQL scripting. - ANSFALSE Joins involving multiple columns must always follow the primary key/foreign key relationship path. - ANSTRUE List 4 aggregate functions - ANSCOUNT(registration_date), AVG (capacity), MIN (capacity), MAX (capacity) List 6 Table-Related Menu Choices - ANSRENAME, COPY, DROP, TRUNCATE, LOCK, & COMMENT List the different types of data dictionary views. - ANSUSER_, ALL_, DBA_, and V$ List the reasons that a subquery could not be unnested. - ANSx List the steps performed by a correlated subquery. - ANS**** Select a row from the outer query, Determine the value of the correlated column, Execute the inner query for each record of the outer query., Feed the results of the inner query to the outer query and evaluate it. It if satisfies the criteria, return the row for output.Select the next record of the outer query and repeat steps 2 through 4 until all the records of the outer query are evaluated.

SQL Developer provides an extensive list of useful reports and offers the capability to create your own user-defined reports - ANSTRUE SQL Developer's ____________________ option allows you to selectively export certain rows and columns. - ANSExport Data SQL*Plus is used more than SQL Developer when you need to run scripts.

  • ANSTRUE Subqueries can return multiple rows. - ANSTRUE Substitution variables are limited to the WHERE clause of a statement. - ANSFALSE The ______ operator compares a list of values for equivalency - ANSANY The _______ function adds values together for a group of rows. - ANSSUM The _______ operator determines common rows. - ANSINTERSECT The ________ operator cannot compare against a list of values. - ANSLIKE The __________ operator is inclusive of the two values specified. - ANSBETWEEN The ___________ operator tests whether a matching row cannot be found.
  • ANSx

The ____________ clause on a CREATE TABLE statement can specify how much space to allocate. - ANSSTORAGE The ____________ command makes changes permanent. - ANSCOMMIT The ____________ icon allows you to execute multiple statements and emulates SQL *Plus as much as possible. - ANSRUN SCRIPT The ____________ keywords and the USING clause of the ANSI join syntax are mutually exclusive. - ANSNATURAL JOIN The _____________ clause determines how rows are grouped. - ANSGROUP BY The ________________ is a type of statement whereby you retrieve data that exists in one table, but not in another. - ANSMINUS The ALL operator returns true if any value in the list satisfies the condition.

  • ANSFALSE The ALTER SESSION statement can change the session's time zone. - ANSTRUE The bitmap index is the most common index structure in Oracle. - ANSFALSE

The focus of the logical data model is _____________ - ANSbusiness problems The INSERT statement creates new data in a table only through single rows. - ANSFALSE The key that most database designers prefer and is chosen by the system is the _____________ key. - ANSSurrogate The lack of a unique index key is frequently the reason for slow performance of updates and deletions - ANSFALSE The MIN and MAX functions cannot take other data types as parameters. - ANSFALSE The MINUS operator shows likenesses between sets of rows. - ANSFALSE The NEXTVAL and CURRVAL pseudocolumns can be used in which of the following SQL constructs? Select all that apply. - ANSVALUES clause of an INSERT statement The Nonequijoin can use the ________________ operator to construct joins that are not based on equality of values. - ANSBETWEEN The number of rows in a table matches the number of columns - ANSFALSE

The ORDER BY clause is allowed in subqueries. - ANSFALSE The purpose of the HAVING clause is to eliminate___________. - ANSGroups The query retrieves more than 5 to 15 percent of the rows - ANSThe indexed column is part of an expression. In this case, consider creating a function-based index instead The ROUND function can take only the NUMBER data type as a parameter

  • ANSFALSE The ROWID pseudocolumn is not an actual column, but it acts like one. - ANSTRUE The RTRIM function is useful for eliminating extra spaces in a string. - ANSTRUE The same function can be used twice in a SELECT statement. - ANSTRUE The SELECT command always places locks on retrieved rows. - ANSFALSE The self join is different from other joins because it does not utilize a primary key or a foreign key. - ANSFALSE

To restart a sequence at a lower number, you can drop and re-create the sequence. - ANSTRUE To revert back to a state that happened before you ran your change statement, you issue a ____________ command. - ANSROLLBACK UNION ALL does not sort, therefore it is less time consuming to use than the UNION operator. - ANSTRUE Users can only see changes made to a database once they have been committed. - ANSTRUE Usually a script only needs to be run and tested one time to make sure that it is functional. - ANSFALSE What are the main components of a ROWID? - ANSThe main components of a ROWID are the data object number, the number of the data block, the numbers of rows within the data block, and the data file number. What do views do that makes them so useful for security? - ANShide data What does SQL stand for? - ANSStructured Query Language What does the following function return? SELECT LENGTH(NULL), FROM dual - ANSNull What is Oracle's most popular index storage structure? - ANSB-Tree Index

What is the command you would type into SQL*Plus if you needed to know the definition for each column of a table? - ANSDICT_COLUMNS What is the data type you can use if you need an unlimited number of textual characters? - ANSCLOB What is the first column of a composite index called? - ANSleading-edge What is the keyboard shortcut for the ROLLBACK command? - ANSF What is the main difference between the NOT EXISTS and the NOT IN operators? - ANSThe way NULL values are treated What is the maximum value for a column defined as NUMBER(4,2)? - ANS99. What is the most common DATE format found in SQL? - ANSDD-MON-YY What is the name of the key automatically generated from a sequence? - ANSsurrogate key What is the name of the view where you can find the collection of static and data dictionary tables and views, along with their descriptions? - ANSDICTIONARY

When using the following data: NUMBER(10,4) - the # 10 is called the __________. - ANSPrecision When using the following data: NUMBER(10,4) - the # 4 is called the __________. - ANSScale When using the following data: NUMBER(10,4) - the lowest number you can possibly have is __________. - ANS-999999. When writing an ANSI outer join, the keywords _________ OUTER and _________ OUTER are added to the __________ keyword to indicate the rows from which table to use. - ANSRIGHT LEFT JOIN When writing the syntax for finding information on three or more tables, the parenthesis around the ON clause is optional. - ANSTRUE When you create a report in SQL Developer all the column names must match identically the names of the columns found in the tables you are referencing. - ANSFALSE When you have issued a DELETE command, you can still retrieve those rows and restore the information. - ANSTRUE When you INSERT new information into a table, it is followed with a _______ keyword that contains the information that is going to be added to the table. - ANSVALUES

When you run a script in SQLPlus you must give the location of the file. - ANSTRUE When you want to run a script in either SQLPlus or SQL Developer, you can use a ______ or the _________ command. - ANS@ or START Which format mask displays December 31st, 1999? - ANSMonth ddth, yyyy Which one of the following string functions tells you how many characters are in a string? - ANSLENGTH Which operator is most commonly used? - ANSUNION Write a solution that adds 20 minutes to a given date. - ANSSELECT SYSDATE+1/ FROM dual Write a statement for SQL*Plus that shows the dictionary. - ANSDESC dict; Write a statement that drops the index need_to_pass_i - ANSDROP INDEX need_to_pass_i Write an SQL statement for SQL *Plus in which you want any unique menu items to be displayed from the restaurant table - ANSSELECT DISTINCT menu FROM restaurant