MANAGEMENT FINAL TEST 2026
QUESTIONS WITH CORRECT ANSWERS
GRADED A+
◍ syntax of creating a function in SQL.
Answer: CREATE [OR REPLACE] FUNCTION
function_name(input_param1 datatype1, input_param2
datatype2)RETURNS datatypeLANGUAGE plpgsqlAS$$DECLARE
internal_var type1;DECLARE internal_var2 type2;BEGIN...Guts of the
function here (statements need to end with semi-colons) and does return a
valueEND;$$;
◍ GROUP BY/ORDER BY syntax practice:.
Answer: SELECT dealership_id, product_id, count(*) as
number_salesFROM salesGROUP BY 1,2ORDER BY 1,2;
◍ SQL Parsing Phase.
Answer: The 1st phase of DBMS query processing. Includes breaking down
the query into smaller units and transforming the original SQL query into a
slightly different version of the original SQL code, but one that is fully
equivalent and more efficient.
◍ CREATE INDEX.
Answer: A SQL command that creates indexes on the basis of a selected
attribute or attributes.
◍ PROJECT operator.
Answer: An operator used to select a subset of columns. In other words, it
yields a vertical subset of a table. This operation retrieves all rows and some
, attributes of a table without using a WHERE clause to limit which rows of
the table are included.π cus_fname, cus_lname
◍ Message.
Answer: In the OO data model, the name of a method sent to an object in
order to perform an action. It triggers the object's behavior.
◍ Unique index.
Answer: An index in which the index key can have only one associated
pointer value (row).
◍ Optional attribute.
Answer: In ER modeling, an attribute that does not require a value;
therefore, it can be left empty.
◍ Index access (unique).
Answer: Used when a table has a unique index in a column
◍ ROUND.
Answer: Rounds a value to specified precision (number of digits)
◍ Relationship degree.
Answer: The number of entities or participants associated with a
relationship. It can be unary, binary, ternary, or higher.
◍ Inner query.
Answer: A query that is embedded or nested inside another query. Also
known as a nested query or a subquery.
◍ Equijoin.
Answer: A join operator that links tables based on an equality condition that
compares specified columns of the tables. Is a special type of theta join
◍ YYYY-MM-DD hh:mm:ss is the format for.
Answer: DATETIME
◍ Datatype that's similar to decimal but has $ in front and always has two
decimal places.
Answer: MONEY
,◍ syntax for calling a stored procedure (using stored procedure from
example):.
Answer: CALL refresh_sales_table();
◍ creating a function example (with SELECT statement below it running the
function).
Answer: CREATE FUNCTION sales_tax(sales_amount float)RETURNS
numeric(10,2)LANGUAGE plpgsqlAS$$DECLARE tax
numeric(10,2);BEGINSELECT
ROUND((sales_amount::numeric(10,2))*0.055,2) INTO tax;RETURN
tax;END;$$;SELECT sales_tax(100);
◍ Dynamic statistical generation mode.
Answer: In a DBMS, the capability to automatically evaluate and update the
database access statistics after each data access operation.
◍ Updatable view.
Answer: A view that can update attributes in base tables that are used in the
view.
◍ FROM operator.
Answer: A SQL clause that specifies the table or tables from which data is
to be retrieved.
◍ SQL Fetching Phase.
Answer: The 3rd phase of DBMS query processing. After the parsing and
execution phases are completed, all rows that match the specified
condition(s) are retrieved, sorted, grouped, and aggregated (if required).
◍ Recursive relationship.
Answer: A relationship found within a single entity type. For example, an
EMPLOYEE is married to an EMPLOYEE or a PART is a component of
another PART.
◍ Section B advice:.
Answer: Explore functions, triggers, stored procedures (refer to Chapter 8 of
, the e-book).Create a transformation function (Ex: Replace "N" with "No",
and "Y" with "Yes", or January 1, 2000, with 1/01/2000) (Can be trigger
function as well).
◍ Automatic query optimization.
Answer: A method by which a DBMS finds the most efficient access path
for the execution of a query.
◍ Index.
Answer: An ordered array of key values and row ID values (pointers). They
are generally used to speed up and facilitate data retrieval.
◍ Unary one-to-many.
Answer: A relationship between a single occurrence of an entity type with
any number of occurrences (minimum one) of the same entity type.
◍ Multivalued attribute.
Answer: An attribute that can have many values for a single entity
occurrence. For example, an EMP_DEGREE attribute might store the string
"BBA, MBA, PHD" to indicate three different degrees held.
◍ Middleware.
Answer: The computer software that allows clients and servers to
communicate within the client/server architecture. It is used to insulate
client processes from the network protocols and the details of the server
process protocols.
◍ Part G advice:.
Answer: Create a Panopto video: Provide a summary of the programming
environment, virtual setup, software, and databases used. Demonstrate code
functionality.Capture screenshots for B-F: code running, green checkmark,
and query output.
◍ Date_Format.
Answer: MySQL function that returns a character string or a formatted
string from a date value