DBMS Quizzy Fo Shizzy

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Dinger87
D
Dinger87
Community Contributor
Quizzes Created: 1 | Total Attempts: 140
| Attempts: 140 | Questions: 76
Please wait...
Question 1 / 76
0 %
0/100
Score 0/100
1. Select the FALSE statement

Explanation

The statement "Each table can have only one primary key" is false. A table can have multiple primary keys, known as a composite key, which consists of two or more columns that uniquely identify a row in the table.

Submit
Please wait...
About This Quiz
DBMS Quizzy Fo Shizzy - Quiz

This 'DBMS quizzy fo shizzy' assesses knowledge in database management systems, focusing on dependencies, anomalies, and normal forms. It's designed to test understanding of key DBMS concepts, crucial for students and professionals in IT and computer science.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. What function will remove the leading and trailing spaces from a char value?

Explanation

The trim() function is used to remove any leading and trailing spaces from a char value. It is commonly used to clean up user input or to remove unnecessary spaces from strings.

Submit
3. One of the following types of constraints is not added to a table using a 'CONSTRAINT' clause. Which one is it?

Explanation

The correct answer is NULL. The NULL constraint is not added to a table using a CONSTRAINT clause. The NULL constraint is used to specify that a column can contain NULL values, indicating that the column does not have to have a value. It is typically specified when creating or altering a table column, rather than using a CONSTRAINT clause.

Submit
4. What command will list all columns (and their datatypes) of a table?

Explanation

The DESCRIBE command is used to display the structure of a table, including all columns and their data types. It provides a concise way to view the metadata of a table without retrieving any actual data. By using the DESCRIBE command, users can quickly understand the layout and characteristics of a table, making it a useful tool for database administrators and developers.

Submit
5. A relational table has a primary key consisting of WareHouseNumber and ProductNumber. That is, each row in the table will contain data about a product stored in a warehouse. One of the columns is ProductDescription. If a product description changes, multiple rows will have to be changed assuming that the product is stored in more than one warehouse. This is an example of a(n) ____ anomaly.

Explanation

The given scenario describes a modification anomaly. This is because when a product description changes, it will have to be updated in multiple rows of the table, leading to redundant data and the potential for inconsistencies if the modification is not made correctly in all affected rows.

Submit
6. The proper way to specify that a trigger should fire when a table is updated and/or deleted is

Explanation

The correct answer is "UPDATE OR DELETE". This means that the trigger should fire when either an update or a delete operation is performed on the table. This option suggests that only one trigger needs to be written to handle both types of operations, making it the proper way to specify the trigger behavior.

Submit
7. Which of the following statements will correctly select all records from the City column of the Offices table, while changing the column header to "City Name Is"?

Explanation

This statement correctly selects all records from the City column of the Offices table and changes the column header to "City Name Is" by using the alias "City Name Is" for the City column in the SELECT statement.

Submit
8. Given the following select statement:SELECT   NameFROM      SalesRepsWHERE   Name LIKE '_a_';

Explanation

The given select statement is filtering the rows from the SalesReps table where the Name column has a pattern of any character, followed by 'a', followed by any character. The three names that match this pattern are Jan, Dan, and Man. Therefore, the correct answer includes these three names.

Submit
9. The 'NEW' and 'OLD' keywords can be used by what kind of triggers?

Explanation

The 'NEW' and 'OLD' keywords can only be used by row triggers. Row triggers are used to perform actions on individual rows that are affected by a data modification statement, such as an INSERT, UPDATE, or DELETE. The 'NEW' keyword refers to the new values being inserted or updated in the row, while the 'OLD' keyword refers to the old values of the row being updated or deleted. Therefore, these keywords are not applicable to statement triggers, which are triggered once per statement rather than per row.

Submit
10. Which phrase causes a trigger to be a row trigger?

Explanation

The phrase "FOR EACH ROW" causes a trigger to be a row trigger. This phrase specifies that the trigger should be executed for each row affected by the triggering event. Without this phrase, the trigger would not be considered a row trigger and may not be executed for each row.

Submit
11. Which of the following is an easier way to write this WHERE clause?WHERE Quota >= 2000AND       Quota <= 3000

Explanation

The correct answer is "WHERE Quota BETWEEN 2000 AND 3000". This is the easier way to write the WHERE clause because it simplifies the condition by using the BETWEEN operator. It specifies that the Quota should be between 2000 and 3000, inclusive. This is more concise and easier to read compared to the other options provided.

Submit
12. A subquery can return many columns of data as its query result

Explanation

A subquery is a query nested within another query. It is used to retrieve data that will be used by the main query. However, a subquery can only return a single value or a single column of data, not multiple columns. Therefore, the statement that a subquery can return many columns of data is false.

Submit
13. What is the name of the symbolic constant that can be used in queries represent the current date?

Explanation

The symbolic constant CURRENT_DATE can be used in queries to represent the current date. It is a built-in function in many database management systems that returns the current date in the format YYYY-MM-DD. By using this constant in queries, one can easily filter or retrieve data based on the current date.

Submit
14. The ORDER BY clause cannot be used in a subquery

Explanation

The ORDER BY clause is used to sort the result set of a query in a specific order. However, it cannot be used in a subquery. Subqueries are nested queries within a main query, and they are used to retrieve data based on certain conditions. Since the purpose of a subquery is to retrieve data, there is no need to sort it. Therefore, the ORDER BY clause is not allowed in a subquery.

Submit
15. A relational table has a primary key consisting of VIN and EngineCode. That is, each row in the table will contain data about a particular automobile and its engine. If a new engine is designed and built, it could not be added to the database unless it was placed in a particular automobile. This is an example of a(n) ______ anomaly.

Explanation

This is an example of an insertion anomaly because a new engine cannot be added to the database unless it is placed in a particular automobile. This means that if a new engine is designed and built, it cannot be inserted into the table without also specifying the corresponding automobile.

Submit
16. What is the name of the function that can convert the value of any column to upper case?

Explanation

The function UPPER(columnname) is used to convert the value of any column to upper case. This function takes the input value from the specified column and returns the same value with all characters converted to uppercase. Therefore, it is the correct answer for the given question.

Submit
17. How often does a statement trigger execute?

Explanation

The statement trigger executes once when an INSERT, UPDATE, or DELETE occurs, regardless of how many rows are affected. This means that even if multiple rows are changed by a single INSERT, UPDATE, or DELETE statement, the trigger will still only fire once.

Submit
18. A Medical Clinic table contains one row per clinic. Each row contains attributes about all the doctors working in the clinic. This violates ____ normal form.

Explanation

The given scenario violates the 1st normal form. The 1st normal form requires that each attribute in a relation must have atomic values, meaning that it should not contain multiple values or repeating groups. In this case, having multiple attributes about doctors in a single row violates this rule. To normalize the table and achieve 1st normal form, the attributes about doctors should be separated into a separate table with a foreign key referencing the clinic table.

Submit
19. If EmployeeAge and EmployeeDateOfBirth are both non-key columns in a table and, given that logically the EmployeeAge can be obtained if one knows the EmployeeDateOfBirth, this is an example of a(n) _____ dependency.

Explanation

This is an example of a derived dependency because the EmployeeAge can be derived or calculated from the EmployeeDateOfBirth column. In other words, the value of EmployeeAge is not stored directly in the table, but can be obtained by performing a calculation or function using the EmployeeDateOfBirth column.

Submit
20. Select the statements that refer to Correlated Sub-queries

Explanation

Correlated sub-queries are queries where the sub-query portion is executed once for every row returned by the outer query. The sub-query contains an outer reference, which means it includes a column from the sub-query that is also in a table from the outer query. This type of sub-query is executed many times, as it needs to be evaluated for each row in the outer query. The DBMS executes the inner query first, then the outer query.

Submit
21. Which of the following is not a type of join discussed in class?

Explanation

The correct answer is Full-Inner Join. In the question, we are asked to identify the type of join that was not discussed in class. However, Full-Inner Join is not a valid type of join in database terminology. Inner Join and Full Outer Join are valid types of joins, but Full-Inner Join does not exist. Therefore, Full-Inner Join is the correct answer.

Submit
22. To create an equi-join based on the "Manages" relationship, which primary key/foreign key combination should be used?

Explanation

To create an equi-join based on the "Manages" relationship, the primary key/foreign key combination that should be used is SalesRep and Mgr. This means that the SalesRep attribute in one table should match the Mgr attribute in another table, indicating that a sales representative is managed by a particular manager.

Submit
23. A CoursesTaught table has a primary key combining both a Course code and an Instructor code. If Instructor name is an attribute of this table, it would violate _____ normal form.

Explanation

If the Instructor name is an attribute of the CoursesTaught table, it would violate the 2nd normal form. The 2nd normal form states that a table should not have partial dependencies, meaning that all non-key attributes should be fully dependent on the entire primary key. In this case, the Instructor name is dependent only on the Instructor code, not on the entire primary key (Course code and Instructor code). Therefore, it violates the 2nd normal form.

Submit
24. Select the statements that refer to Non-Correlated Sub-queries

Explanation

Non-Correlated Sub-queries are sub-queries that are executed only once. In these types of sub-queries, the DBMS executes the inner query first, followed by the outer query. These sub-queries do not depend on the outer query and are independent of the outer query's result. They are usually used to retrieve a single value or set of values that are then used in the outer query. Non-Correlated Sub-queries are efficient as they are executed only once, reducing the overall execution time of the query.

Submit
25. The INSERT, DELETE, and UPDATE statements are considered what in SQL?

Explanation

The INSERT, DELETE, and UPDATE statements are considered as DML (Data Manipulation Language) in SQL. DML is used to manipulate and modify data within the database. It allows users to insert new data, delete existing data, and update existing data in the database tables. DDL (Data Definition Language) is used to define the structure and schema of the database objects, while transactions are used to ensure the atomicity, consistency, isolation, and durability of the database operations. Therefore, the correct answer is DML (Data Manipulation Language).

Submit
26. If there is  FULL-OUTER JOIN between two tables, what will be returned?

Explanation

A FULL-OUTER JOIN returns all the rows from both tables, regardless of whether they have a match in the other table or not. This means that it includes all rows from both tables, including those that have a match in both tables, as well as any rows that do not have a match in the other table. Therefore, it returns all the rows from both tables whether they have a match in the other or not.

Submit
27. To update the column "Name" on a table to null, you use the following syntax:SET Name TO NULL;

Explanation

The given statement is false. To update the column "Name" on a table to null, the correct syntax is: UPDATE table_name SET Name = NULL;

Submit
28. Does this FROM clause

FROM Offices LEFT OUTER JOIN SalesReps

Mean the same thing as this FROM Clause?

FROM SalesReps RIGHT OUTER JOIN Offices

Explanation

The given correct answer is true because in SQL, the LEFT OUTER JOIN and RIGHT OUTER JOIN are essentially the same operation, just with the positions of the tables swapped. Both join types return all rows from the left table (Offices in this case) and the matching rows from the right table (SalesReps in this case). Therefore, the two FROM clauses mentioned in the question will produce the same result set.

Submit
29. EmployeeAge and EmployeeDateOfBirth are both non-key columns in a table. Given that the EmployeeAge can be obtained if one knows the EmployeeDateOfBirth, this would violate ____ normal form.

Explanation

This would violate the 3rd normal form. The 3rd normal form states that every non-key column in a table must depend on the key column(s) only and not on any other non-key column. In this case, the EmployeeAge column depends on the EmployeeDateOfBirth column, which is a non-key column, violating the 3rd normal form.

Submit
30. When deleting from a table, the DELETE statement must specify the columns on the table to delete. Example:DELETE: CustNumFROM     CustomersWHERE   CustNum = 100;

Explanation

The given statement is false. When deleting from a table, the DELETE statement does not need to specify the columns on the table to delete. The DELETE statement only needs to specify the table from which the rows should be deleted and any additional conditions for the deletion. In the given example, the correct DELETE statement would be: DELETE FROM Customers WHERE CustNum = 100;

Submit
31. When granting privileges, you can only grant

Explanation

When granting privileges, you can only grant them to one object at a time. This means that you cannot grant privileges to multiple objects simultaneously. Each object needs to be granted privileges individually.

Submit
32. In the ANSI/ISO transaction model, a program is always in transaction mode

Explanation

In the ANSI/ISO transaction model, a program is always in transaction mode. This means that any changes made to the database by the program are treated as a single logical unit of work, and are either all committed or all rolled back. This ensures data consistency and integrity. Therefore, the statement "a program is always in transaction mode" is true in the ANSI/ISO transaction model.

Submit
33. If there is a RIGHT-OUTER JOIN between two tables, what will be returned?

Explanation

A RIGHT-OUTER JOIN between two tables will return all rows where there is a match in both tables, plus any rows in the right table on the FROM clause that do not have a match on the left table. This means that all the rows from the right table will be included in the result, regardless of whether they have a match in the left table or not.

Submit
34. Select the FALSE statement

Explanation

not-available-via-ai

Submit
35. In the Non-ANSI/ISO transaction model, a transaction can be partially rolled back to a named point.

Explanation

In the Non-ANSI/ISO transaction model, a transaction can be partially rolled back to a named point. This means that if there is a need to undo only a portion of the transaction, it is possible to roll back to a specific point within the transaction rather than rolling back the entire transaction. This allows for more flexibility and precision in managing transactions and can be useful in certain scenarios where only a specific part of the transaction needs to be undone.

Submit
36. If DeptCode and DeptName are both non-key columns in a table and, given that logically the Deptname can be obtained if one knows the DeptCode, this is an example of a(n)  ______ dependancy.

Explanation

This is an example of a transitive dependency because the DeptName can be derived from the DeptCode. In other words, knowing the value of the DeptCode allows us to determine the value of the DeptName.

Submit
37. Which column function will count all records in a result set, regardless of the presence of null values?

Explanation

The COUNT(*) function will count all records in a result set, regardless of the presence of null values. This is because the asterisk (*) is a wildcard character that represents all columns in the result set. So, using COUNT(*) will count all rows, including those with null values.

Submit
38. When using the AVG() column function, NULL values are included in the calculation

Explanation

The AVG() column function calculates the average of a column's values. By default, NULL values are not included in the calculation. Therefore, the given statement is false.

Submit
39. In a relational database, is a synonym for column is 

Explanation

In a relational database, an attribute is a synonym for a column. An attribute refers to a characteristic or property of an entity or object in a database table. It represents a specific piece of information that can be stored in a column. Therefore, the correct answer is Attribute.

Submit
40. The order of columns in a relational table (is)

Explanation

The order of columns in a relational table is determined by the left to right sequence in which they are defined when the table is created. This means that the columns will appear in the table in the same order as they were specified during the table creation process.

Submit
41. When revoking privileges on you objects, you can

Explanation

You can revoke any privilege at any time, regardless of who granted it or whether it was granted with "WITH GRANT OPTIONS". The ability to revoke privileges gives you control over the access and permissions granted to users on your objects.

Submit
42. Select the true statement about column functions:

Explanation

A column function takes an entire column of data and summarizes it into a single data item. This means that the function performs a calculation or operation on every value in the column and returns a single result. The function can be used to calculate the sum, average, minimum, maximum, or any other aggregate value of the column. The WHERE clause, on the other hand, is used to filter the rows based on certain conditions and is not directly related to column functions.

Submit
43. In a "one-to-many" relationship between two tables, foreign keys are stored in ____ tables

Explanation

In a "one-to-many" relationship between two tables, the foreign keys are stored in the child table. This is because in a one-to-many relationship, each record in the child table can have multiple related records in the parent table. Therefore, the foreign key in the child table is used to establish the connection between the child and parent tables.

Submit
44. What does the "WITH GRANT OPTION" clause of the GRANT statement do?

Explanation

The "WITH GRANT OPTION" clause of the GRANT statement allows a user to grant privileges received on someone else's table to another user. This means that a user who has been granted privileges on a table can pass on those privileges to another user, giving them the same level of access to the table.

Submit
45. You need to insert a new product in a Product table but the classification (a grouping such as "stationary") into which this product fits is yet to be determined. What would likely be entered for the classification code assuming it is a three position character field?

Explanation

In this scenario, since the classification for the new product is yet to be determined, it would make sense to not enter anything in the classification code field. This would indicate that the classification is unknown or not assigned yet.

Submit
46. A primary key created from two or more columns is referred to as a(n) ____ primary key

Explanation

A primary key created from two or more columns is referred to as a composite primary key. This type of primary key is used when a single column cannot uniquely identify a record in a table. By combining multiple columns, a composite primary key ensures that each combination of values is unique and can be used to uniquely identify a record in the table.

Submit
47. In Oracle, the view that displays the tables you have created is called

Explanation

The view in Oracle that displays the tables created by the user is called User_Tables. This view provides information about the tables owned by the current user, including the table name, tablespace, number of rows, and other relevant details. It allows the user to easily access and manage the tables they have created in the database.

Submit
48. A SELECT statement that uses the column functions can also include a WHERE clause

Explanation

The given statement is true because a SELECT statement can include both column functions and a WHERE clause. Column functions allow us to perform calculations or manipulations on the values in a column, while the WHERE clause is used to filter the rows based on certain conditions. By combining these two elements, we can retrieve specific data from a table that meets the specified criteria.

Submit
49. In Oracle, owner of the system catalog is

Explanation

In Oracle, the owner of the system catalog is SYS. SYS is a predefined user account that is created when Oracle is installed. It has the highest level of privileges and is responsible for managing the Oracle database. The SYS user owns all the base tables and views that make up the system catalog, which contains metadata about the database objects and their relationships. This allows SYS to have full control over the database and perform administrative tasks.

Submit
50. In Oracle's User_Constrains view, what indicates a foreign key in the Constraint_Type column?

Explanation

In Oracle's User_Constraints view, the "R" value in the Constraint_Type column indicates a foreign key.

Submit
51. Some of the views in the System Catalog have a prefix "USER_". What is found in these tables ? (Select all that apply)

Explanation

The views in the System Catalog with the prefix "USER_" contain information on your tables, specifically the tables in your schema. These views provide details about the structure and properties of the tables that you have created in the database. They do not contain information on system tables or tables that you have been granted access to.

Submit
52. The term "surrogate" is usually associated with

Explanation

The term "surrogate" is usually associated with primary keys. A surrogate key is a unique identifier that is added to a table to serve as the primary key, instead of using a natural key. Surrogate keys are typically generated by the system and have no inherent meaning or relationship to the data they represent. They are commonly used in database design to improve performance, simplify data management, and ensure data integrity.

Submit
53. Some of the views in the System Catalog have a prefix "ALL_". What is found in these tables? (Select all that apply)

Explanation

The views in the System Catalog with the prefix "ALL_" provide information on the following:
1. Information on your tables (tables in your schema): These views contain details about the tables that you have created in your schema.
2. Information on system tables: These views provide information about the system tables in the database.
3. Information on tables you have been granted access to: These views display information about the tables for which you have been granted access permissions.

Submit
54. Select the true statements about HAVING clauses from the list below. (There are more than one)

Explanation

The HAVING clause is used to eliminate groups from the result set based on a condition. It is applied after the GROUP BY clause and can include one or more column functions that are applied to each group. This means that if a column function is used in the HAVING clause, it will be calculated after the grouping is done, which can result in additional processing. The HAVING clause is not used to eliminate individual rows from the result set, but rather entire groups that do not meet the specified condition.

Submit
55. Where are working variables declared?

Explanation

Working variables are declared between the keywords AS and BEGIN in a stored procedure. These variables are used to store temporary data and can be accessed and manipulated within the scope of the stored procedure. By declaring the variables between AS and BEGIN, they are defined and initialized before being used in the logic of the stored procedure. This ensures that the variables are properly declared and can be used without any errors or issues.

Submit
56. In a "one-to-many" relationship between two tables, foreign keys are stored in ____ tables.

Explanation

In a "one-to-many" relationship between two tables, the foreign keys are stored in the child table. The child table is the table that contains multiple records that are related to a single record in the parent table. The foreign key in the child table is used to establish the relationship between the child and parent tables, allowing for the retrieval of data from both tables based on the relationship.

Submit
57. What is the correct syntax for assigning a value to a variable?

Explanation

The correct syntax for assigning a value to a variable in this case is "wVar := 10;". This is the assignment operator in some programming languages, such as Pascal or Ada. The other options are incorrect syntax for variable assignment. "wVar.equals(10);" is not a valid syntax for assigning a value, as it seems to be using a method to compare the variable to the value. "wVar = 10;" is the assignment operator in languages like Java or C++, but it is not the correct syntax given in this question. "wVar == 10;" is the equality operator used for comparison, not assignment.

Submit
58. What is the difference between a stored procedure and a stored function?

Explanation

A stored function can return a value using a return statement, whereas a stored procedure cannot. Stored functions are designed to return a single value, which can be used in queries or assigned to variables. On the other hand, stored procedures are used to perform actions and can have multiple input and output parameters, but they do not have a return statement to provide a value as a result.

Submit
59. A "thing" such as a Fixed Asset would likely be considered a(n) ___ in a relational model

Explanation

In a relational model, a "thing" such as a Fixed Asset would likely be considered an entity. In a database, an entity represents a real-world object or concept that can be distinguished from other objects. It is typically represented as a table, with each row in the table representing a specific instance or occurrence of that entity. Therefore, an entity is the most suitable term to describe a "thing" like a Fixed Asset in a relational model.

Submit
60. What types of loops can you code in PL/SQL? 

Explanation

In PL/SQL, you can code both FOR and WHILE loops. The FOR loop is used when you know the number of iterations in advance, and it iterates a specific number of times. The WHILE loop is used when you want to repeat a block of code until a certain condition is met. Therefore, the correct answer is "Only FOR and WHILE loops."

Submit
61. Based on this diagram, select the false statementERD Sample

Explanation

The given diagram shows a many-to-many relationship between employees and projects, indicating that an employee may be working on several projects. This means that the statement "An employee may be working on several projects" is true, not false. Therefore, the correct answer is that there is no false statement in the given options.

Submit
62. ERD SampleThis diagram is an example of which type of ERD

Explanation

not-available-via-ai

Submit
63. What is a key attribute

Explanation

A key attribute is a property that uniquely describes an entity. In an ERD (Entity-Relationship Diagram), a key attribute is essential for identifying and distinguishing one entity from another. It can be either a Primary Key or a Foreign Key, as both types of keys are used to establish relationships between entities. While it is true that a key attribute is a common property of an entity, it is more specifically defined as a property that serves as a key in the database schema design.

Submit
64. Given this function which is part of an SQL Select: to_char(Sales,'$9,990.00). If the value of Sales on the row is 4.95, the output produced would be

Explanation

The given function "to_char(Sales,'$9,990.00)" is used to format the value of the "Sales" column as a currency with a specific format. In this case, the format is set to display the dollar sign ($) followed by the value with two decimal places. Therefore, when the value of "Sales" is 4.95, the output produced would be "$4.95".

Submit
65. SQL provides

Explanation

SQL provides all of the mentioned functionalities. Data selection and retrieval is one of the key features of SQL, allowing users to query and retrieve specific data from a database. Data definition involves creating and modifying database objects such as tables, views, and indexes. Data integrity ensures that the data stored in the database is accurate and consistent. Access control allows administrators to manage user permissions and restrict access to sensitive data. Therefore, SQL provides all of these functionalities.

Submit
66. An application that uses SQL is portable from one DBMS to another

Explanation

An application that uses SQL is usually portable from one DBMS (Database Management System) to another, but it may require some minor modifications. SQL (Structured Query Language) is standardized, meaning that it follows a set of rules and conventions that are widely accepted in the industry. However, different DBMS may have slight variations in their implementation of SQL or support for certain features. Therefore, when moving an application from one DBMS to another, some adjustments might be necessary to ensure compatibility and optimal performance.

Submit
67. How many rows can a cursor return?

Explanation

A cursor is a database object that allows you to retrieve and manipulate data row by row. It can return zero rows if the query it is based on does not match any records in the database. On the other hand, it can also return one or more rows if the query does have matching records. Therefore, the correct answer is "Zero or more" rows that a cursor can return.

Submit
68. SQL is a(n)

Explanation

SQL is a language designed specifically for managing and manipulating relational databases. It provides a standard set of commands and syntax for creating, querying, updating, and deleting data in a structured manner. While it shares some similarities with programming languages like Java, it is primarily focused on database operations rather than general-purpose programming. Therefore, SQL is considered a language designed for relational databases.

Submit
69. Select the three items required in order to use a cursor

Explanation

To use a cursor, you need to define a select as a cursor, which allows you to retrieve data from the database. Additionally, you need to define a variable to hold the column(s) that the SELECT statement returns, as well as use a special form of the FOR loop to iterate through the rows in each cursor. These three items are necessary to effectively use a cursor in database operations.

Submit
70. What is the maximum size of a table name?

Explanation

The maximum size of a table name is 20 characters. This means that the name of a table cannot exceed 20 characters in length.

Submit
71. What advantage is there to naming constraints?

Explanation

Naming constraints can make understanding certain error messages easier because when a constraint violation occurs, the error message will include the name of the constraint that was violated. This allows the developer to quickly identify which constraint caused the error and makes troubleshooting and debugging easier. Without named constraints, the error message would only provide generic information about the violation, making it more difficult to pinpoint the exact cause of the error.

Submit
72. A relational table has a primary key consisting of ProductNumber. On each row, non-key attributes WareHouseNumber and the warehouse address information are also found. That is, each row in the table will contain data about a product stored in a warehouse. If the last product in a particular warehouse is removed from the database, it results in the loss of all the information of the warehouse where it is located. This is an example of a(n) ______ anomaly.

Explanation

This scenario describes a deletion anomaly. A deletion anomaly occurs when removing a specific record from a table results in the loss of other related information that is still valid and necessary. In this case, if the last product in a warehouse is deleted, all the information about that warehouse, including the warehouse address, will be lost. This is an example of a deletion anomaly because the removal of one record causes the loss of other related data.

Submit
73. When inserting a new row with a date, and you want to insert the date today, you can use the symbolic constant 'TODAY'

Explanation

The statement is false because there is no symbolic constant 'TODAY' in SQL to insert the current date. Instead, you can use functions like GETDATE() or CURRENT_DATE() to insert the current date into a new row.

Submit
74. In Oracle, when a column is declared as a CHAR(x) data type, the maximum value of x is

Explanation

When a column is declared as a CHAR(x) data type in Oracle, the maximum value of x is 2000. This means that the column can store up to 2000 characters.

Submit
75. DeptCode and DeptName are both non-key columns in a table. Given that logically the DeptName can be obtained if one knows the DeptCode, this would violate ____ normal form.

Explanation

In the given scenario, the fact that the DeptName can be obtained if one knows the DeptCode indicates a transitive dependency between these two columns. According to the rules of the third normal form (3NF), a table should not have any transitive dependencies. Therefore, if DeptCode and DeptName are both non-key columns and DeptName can be derived from DeptCode, it violates the 3NF.

Submit
76. What is the correct order of execution of all the following SQL clauses?
Submit
View My Results

Quiz Review Timeline (Updated): Aug 8, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Aug 08, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 25, 2015
    Quiz Created by
    Dinger87
Cancel
  • All
    All (76)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Select the FALSE statement
What function will remove the leading and trailing spaces from a char...
One of the following types of constraints is not added to a table...
What command will list all columns (and their datatypes) of a table?
A relational table has a primary key consisting of WareHouseNumber and...
The proper way to specify that a trigger should fire when a table is...
Which of the following statements will correctly select all records...
Given the following select statement:SELECT   NameFROM  ...
The 'NEW' and 'OLD' keywords can be used by what kind...
Which phrase causes a trigger to be a row trigger?
Which of the following is an easier way to write this WHERE...
A subquery can return many columns of data as its query result
What is the name of the symbolic constant that can be used in queries...
The ORDER BY clause cannot be used in a subquery
A relational table has a primary key consisting of VIN and EngineCode....
What is the name of the function that can convert the value of any...
How often does a statement trigger execute?
A Medical Clinic table contains one row per clinic. Each row contains...
If EmployeeAge and EmployeeDateOfBirth are both non-key columns in a...
Select the statements that refer to Correlated Sub-queries
Which of the following is not a type of join discussed in class?
To create an equi-join based on the "Manages" relationship,...
A CoursesTaught table has a primary key combining both a Course code...
Select the statements that refer to Non-Correlated Sub-queries
The INSERT, DELETE, and UPDATE statements are considered what in SQL?
If there is  FULL-OUTER JOIN between two tables, what will be...
To update the column "Name" on a table to null, you use the...
Does this FROM clauseFROM Offices LEFT OUTER JOIN SalesRepsMean the...
EmployeeAge and EmployeeDateOfBirth are both non-key columns in a...
When deleting from a table, the DELETE statement must specify the...
When granting privileges, you can only grant
In the ANSI/ISO transaction model, a program is always in transaction...
If there is a RIGHT-OUTER JOIN between two tables, what will be...
Select the FALSE statement
In the Non-ANSI/ISO transaction model, a transaction can be partially...
If DeptCode and DeptName are both non-key columns in a table and,...
Which column function will count all records in a result set,...
When using the AVG() column function, NULL values are included in the...
In a relational database, is a synonym for column is 
The order of columns in a relational table (is)
When revoking privileges on you objects, you can
Select the true statement about column functions:
In a "one-to-many" relationship between two tables, foreign...
What does the "WITH GRANT OPTION" clause of the GRANT...
You need to insert a new product in a Product table but the...
A primary key created from two or more columns is referred to as a(n)...
In Oracle, the view that displays the tables you have created is...
A SELECT statement that uses the column functions can also include a...
In Oracle, owner of the system catalog is
In Oracle's User_Constrains view, what indicates a foreign key in...
Some of the views in the System Catalog have a prefix...
The term "surrogate" is usually associated with
Some of the views in the System Catalog have a prefix...
Select the true statements about HAVING clauses from the list below....
Where are working variables declared?
In a "one-to-many" relationship between two tables, foreign...
What is the correct syntax for assigning a value to a variable?
What is the difference between a stored procedure and a stored...
A "thing" such as a Fixed Asset would likely be considered...
What types of loops can you code in PL/SQL? 
Based on this diagram, select the false statement
This diagram is an example of which type of ERD
What is a key attribute
Given this function which is part of an SQL Select:...
SQL provides
An application that uses SQL is portable from one DBMS to another
How many rows can a cursor return?
SQL is a(n)
Select the three items required in order to use a cursor
What is the maximum size of a table name?
What advantage is there to naming constraints?
A relational table has a primary key consisting of ProductNumber. On...
When inserting a new row with a date, and you want to insert the date...
In Oracle, when a column is declared as a CHAR(x) data type, the...
DeptCode and DeptName are both non-key columns in a table. Given that...
What is the correct order of execution of all the following SQL...
Alert!

Advertisement