joi, 4 octombrie 2018

databse programming section 1

1. Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL query? Mark for Review
(1) Points


OR


AND


SUBSTITUTE


AS (*)

2.The SQL SELECT statement is capable of: Mark for Review
(1) Points


Selection and protection


Selection and projection (*)


Projection and updating


None of the above


3.What is a NULL value? Mark for Review
(1) Points


A blank space


A known value less than zero


A perfect zero


An unknown value (*)


4. In which clause of a SELECT statement would you specify the name of the table or tables being queried? Mark for Review
(1) Points


The FROM clause (*)


The SELECT clause


The WHERE clause


Any of the above options; you can list tables wherever you want in a SELECT statement.



6. In the real world, databases used by businesses generally have a single table . True or False? Mark for Review
(1) Points


True


False (*)

7. What language is used to query data in a Relational Database? Mark for Review
(1) Points


Java


C++


BASIC


SQL (*)

8. Databases are used in most countries and by most governments. Life, as we know it, would change drastically if we no longer had access to databases. True or False? Mark for Review
(1) Points


True (*)


False




9. Most of the well know Internet search engines use databases to store data. True or False? Mark for Review 
(1) Points
True (*)

False


10. A Relational Database generally contains two or more tables. True or False? Mark for Review 

(1) Points


True (*)

False

11. What command can be used to show information about the structure of a table? Mark for Review 
(1) Points
INSERT

ALTER

DESCRIBE (*)

SELECT


12. What command retrieves data from the database? Mark for Review 
(1) Points
SELECT (*)

INSERT

DESCRIBE

ALTER



13. All computers in the world speak the same languages, so you only need to learn one programming language - Oracle SQL. True or False? Mark for Review 
(1) Points
True

False (*)





15. What command will return data from the database to you? Mark for Review 
(1) Points
FETCH

RETURN

SELECT (*)

GET




Every time you shop online, it is likely you will be accessing a database. True or False? Mark for Review 
(1) Points
True (*)

False


  Every row in a relational database table is unique. Mark for Review 
(1) Points
True (*)

False


  The basic storage structure in a Relational Database is a _________: Mark for Review 
(1) Points
Key

Row

Table (*)

Field


  Columns in a database table contain data with the same _________: Mark for Review 
(1) Points
Type (*)

Field

Row

Key

In the default order of precedence, which operator would be evaluated first? Mark for Review 
(1) Points
Divisions and Subtractions are at the same level and would be evaluated first based on left to right order

Subtractions and Additions are at the same level and would be evaluated first based on left to right order

Additions and Multiplications are at the same level and would be evaluated first based on left to right order

Multiplications and Divisions are at the same level and would be evaluated first based on left to right order (*)


The SELECT statement retrieves information from the database. In a SELECT statement, you can do all of the following EXCEPT: Mark for Review 
(1) Points
Projection

Manipulation (*)

Selection

Joining

When listing columns in the SELECT list, what should you use to separate the columns? Mark for Review 
(1) Points
Underscores

Dashes

Commas (*)

Semicolons


Which SQL keyword specifies that an alias will be substituted for a column name in the output of a SQL query? Mark for Review 
(1) Points
OR

AND

SUBSTITUTE

AS (*)


If a SQL statement returns data from two or more tables, which SQL capability is being used? Mark for Review 
(1) Points
Selection

Joining (*)

Insertion

Projection

There is only one kind of software used by all computers. True or False? Mark for Review 
(1) Points
True

False (*)


What command can be used to show information about the structure of a table? Mark for Review 
(1) Points
SELECT

INSERT

DESCRIBE (*)

ALTER


The _______ clause can be added to a SELECT statement to return a subset of the data. Mark for Review 
(1) Points
WHICH

EVERY

ANYWHERE

WHERE (*)


You cannot use computers unless you completely understand exactly how they work. True or False? Mark for Review 
(1) Points
True

False (*)


What command can be added to a select statement to return a subset of the data? Mark for Review 
(1) Points
WHERE (*)

ALL

WHEN

EVERYONE


The EMPLOYEES table contains these columns:
SALARY NUMBER(7,2)
BONUS NUMBER(7,2)
COMMISSION_PCT NUMBER(2,2)

All three columns contain values greater than zero.
There is one row of data in the table and the values are as follows:
Salary = 500, Bonus = 50, Commission_pct = .5

Evaluate these two SQL statements:

1.
SELECT salary + bonus + commission_pct * salary - bonus AS income
FROM employees;

2.
SELECT (salary + bonus ) + commission_pct * (salary - bonus) income
FROM employees;

What will be the result?

 Mark for Review
(1) Points


One of the statements will NOT execute.


Statement 2 will return a higher value than statement 1.(*)


Statement 1 will return a higher value than statement 2.


Statement 1 will display a different column heading.




Examine the follolowing SELECT statement.
SELECT *
FROM employees;

This statement will retrieve all the rows in the employees table. True or False?

 Mark for Review
(1) Points


True(*)


False

Niciun comentariu:

Trimiteți un comentariu