Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SOME questions about database Question 40 1. Evaluate this CREATE TABLE statement. SQL> CREATE TABLE order*1 ( order# NUMBER(9), cust_id NUMBER(9), date_1 DATE DEFAULT SYSDATE);

SOME questions about database

Question 40

1. Evaluate this CREATE TABLE statement.

SQL> CREATE TABLE order*1 ( order# NUMBER(9), cust_id NUMBER(9), date_1 DATE DEFAULT SYSDATE);

Which line of this statement will cause an error?

Line 1

Line 2

Line 3

Line 4

Question 42

1. Which of the following is a project management tool that shows tasks, resources, task dependencies, and timelines for a project

A.

project chart

B.

Gantt chart

C.

E-R diagram

D.

spreadsheet

0.5 points

Question 43

1. The PO_DETAIL table contains these columns:

PO_NUM NUMBER NOT NULL, Primary Key PO_LINE_ID NUMBER NOT NULL, Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID column of the PRODUCT table QUANTITY NUMBER UNIT_PRICE NUMBER(5,2)

On which column(s) is an index automatically created for the PO_DETAIL table?

PO_NUM only

UNIT_PRICE only

PRODUCT_ID only

PO_LINE_ID only

both PO_NUM and PO_LINE_ID

Question 46

1. In a JDBC application, the class that is used to connect to the database is

A.

the JDBC class

B.

the DriverManager class

C.

the QueryObject class

D.

the DatabaseConnection class

Question 48

1.

When a local procedure that references a remote procedure is compiled, what is recorded in the p-code or object code?

a.

both timestamps of the local and remote procedures

b.

the timestamp of the local procedure compilation only

c.

the timestamp of the remote procedure compilation only

d.

no timestamps, unless a reference is made to PRAGMA RESTRICT_REFERENCES

0.5 points

Question 49

1. Code example 6-2 WITH invoice_averages AS (SELECT vendor_id, AVG(invoice_total) AS average_invoice FROM invoices GROUP BY vendor_id HAVING AVG(invoice_total) > 100 ORDER BY average_invoice DESC) SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN invoice_averages ia ON i.vendor_id = ia.vendor_id GROUP BY i.vendor_id ORDER BY largest_invoice DESC

(Please refer to code example 6-2.) When this query is executed, the result table will contain one row for

a.

each invoice in the invoice_averages table

b.

each vendor

c.

each invoice

d.

each vendor in the invoice_averages table

Question 50

1. Making adjustments to physical database structures in order to improve performance is called system

A.

prototyping

B.

evolution

C.

analysis

D.

tuning

0.5 points

Question 51

1.

Examine this package:

CREATE OR REPLACE PACKAGE theater_pck

IS

current_avg_cost_per_ticket NUMBER;

PROCEDURE find_seats_sold

(v_movie_id IN NUMBER DEFAULT 34, v_theater_id IN NUMBER);

FUNCTION get_budget

(v_studio_id IN NUMBER)

RETURN NUMBER;

END theater_pck;

You issue this statement in SQL*Plus:

EXECUTE theater_pck.current_avg_cost_per_ticket := 1

What is true about the state of current_avg_cost_per_ticket ?

a.

It is set to 10 for all user sessions.

b.

It is set to 0 due to an illegal reference.

c.

It is set to 10 for the duration of the statement.

d.

It is set to 10 in the current session, but potentially can be modified again by that same session

Question 55

1. Examine the structures of the PLAYER and TEAM tables:

PLAYER ------------- PLAYER_ID NUMBER PK LAST_NAME VARCHAR2(30) FIRST_NAME VARCHAR2(25) TEAM_ID NUMBER MGR_ID NUMBER SIGNING_BONUS NUMBER(9,2)

TEAM --------- TEAM_ID NUMBER TEAM_NAME VARCHAR2(30)

Which situation would require a subquery to return the desired result?

a list of all players who are also managers

a list of all teams that have more than 11 players

a list of all players, including their signing bonus amounts and their manager names

a list of all players who have a larger signing bonus than their manager

a list of all players who received a signing bonus that was lower than the average bonus

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

What is involved in the administration of a labor agreement?

Answered: 1 week ago