Dias Khalelov
Quiz by , created more than 1 year ago

Quiz on DatabaseDesignFinal, created by Dias Khalelov on 29/12/2016.

801
2
0
No tags specified
Dias Khalelov
Created by Dias Khalelov over 7 years ago
Close

DatabaseDesignFinal

Question 1 of 67

1

The __operator returns all tuples in one relation that are not found in the other relation.

Select one of the following:

  • Select

  • None

  • intersect

  • difference

Explanation

Question 2 of 67

1

The__ operator combines all tuples from two relations excluding duplicates.

Select one of the following:

  • Intersect

  • difference

  • union

  • divide

Explanation

Question 3 of 67

1

The HAVING clause does which of the following?

Select one of the following:

  • Acts like a WHERE clause but HAVING is used for columns rather than groups.

  • Acts like a WHERE clause but HAVING is used for rows rather than columns.

  • Acts like a WHERE clause but HAVING is used for groups rather than rows.

  • Acts EXACTLY like a WHERE clause.

Explanation

Question 4 of 67

1

The NULL SQL keyword is used to…

Select one of the following:

  • Represent 0 value

  • Represent a missing or unknown value. NULL in SQL represents nothing.

  • Represent positive infinity

  • Represent negative infinity

Explanation

Question 5 of 67

1

The SQL BETWEEN operator..

Select one of the following:

  • None of the given

  • Specifies which tables we are selecting from

  • Specifies that a column is a primary key

  • Specifies a range to test

Explanation

Question 6 of 67

1

The AVG SQL function return the…

Select one of the following:

  • Maximum value from a column

  • Average number of rows in all tables

  • Average value in a column

  • The sum of values in a column

Explanation

Question 7 of 67

1

The command to remove row from CUSTOMER table is:

Select one of the following:

  • REMOVE FROM customer

  • DROP FROM customer

  • UPDATE FROM customer

  • DELETE FROM customer WHERE…

Explanation

Question 8 of 67

1

What type of join is needed when you wish to include rows that do not have matching values?

Select one of the following:

  • OUTER and INNER JOIN

  • INNER JOIN

  • OUTER JOIN

  • None of the given

Explanation

Question 9 of 67

1

What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT (Order)>5

Select one of the following:

  • Selects the total number of orders from the Sales table, if this number is greater than 5

  • Selects all customers with number of orders from table Sales that have made more than 5 orders

  • None of the give

  • Selects all customers from the Sales table

Explanation

Question 10 of 67

1

What operator tests column for the absence of data ?

Select one of the following:

  • NOT operator

  • IS NULL operator

  • EXIST operator

  • None of the given

Explanation

Question 11 of 67

1

What does the SQL FROM clause do?

Select one of the following:

  • Specifies a search condition

  • None of the given

  • Specifies the columns we are retrieving

  • Specifies the table to retrieve rows from

Explanation

Question 12 of 67

1

What does follow after the SQL SELECT clause?

Select one of the following:

  • None of the given

  • List of columns that will selected or the * symbol

  • Selection condition

  • The name of the table we are selecting from

Explanation

Question 13 of 67

1

What is the keyword you would use before adding conditions to your query?

Select one of the following:

  • EQUALS

  • WHAT

  • CONDITIONS

  • WHERE

Explanation

Question 14 of 67

1

What is meant by the following relational statement STUDENT X COURSE ?

Select one of the following:

  • Compute the full outer join between the STUDENT and COURSE relations

  • Compute the left outer join between the STUDENT and COURSE relations

  • Compute the right outer join between the STUDENT and COURSE relations

  • Compute the cartesian between the STUDENT and COURSE relations

Explanation

Question 15 of 67

1

What does follow after the SQL WHERE clause?

Select one of the following:

  • List of columns to be selected

  • None of the given

  • Name of the table we are selecting from

  • Selection condition

Explanation

Question 16 of 67

1

What is meant by the term union compatibility?

Select one of the following:

  • None

  • When two or more tables share the same (or compatible) domains

  • When two or more tables share the same number of columns and when they share the same domains

  • When two or more tables share the same number of columns

Explanation

Question 17 of 67

1

What keyword can you use to search for a string in a column?

Select one of the following:

  • FIND STRING

  • LIKE

  • CONTAINS STRING

  • HAS STRING

Explanation

Question 18 of 67

1

What is the meaning of LIKE ‘%0%0%’

Select one of the following:

  • Feature begins with the two 0’s

  • Feature ends with two 0’s

  • Feature has more than two 0’s

  • Feature has two 0’s in it, at any position

Explanation

Question 19 of 67

1

What is the purpose of the SQL AS clause?

Select one of the following:

  • The AS clause is used with the aggregate functions only

  • None of the given

  • The AS clause defines a search condition

  • The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

Explanation

Question 20 of 67

1

Which product is returned in a join query have no join condition:

Select one of the following:

  • None

  • Equijoins

  • Both

  • Cartesian

Explanation

Question 21 of 67

1

Which SQL statement will selects all rows from a table called “Customers” and orders the result by “customer name” ?

Select one of the following:

  • SELECT * FROM Customers ORDERED customer_name

  • SELECT * FROM Customers ORDERED BY’ customer_name

  • SELECT * FROM Customers ORDER customer_name

  • SELECT * FROM Customers ORDER ON customer_name

Explanation

Question 22 of 67

1

Which SQL statement is used to extract data from a database?

Select one of the following:

  • EXTRACT

  • OPEN

  • SELECT

  • GET

Explanation

Question 23 of 67

1

Which of the following is a legal expression in SQL?

Select one of the following:

  • SELECT NULL FROM Employee;

  • SELECT name FROM Employee WHEN salary = NULL;

  • None of the given

  • SELECT name FROM Employee;

Explanation

Question 24 of 67

1

Which SQL keyword is used to retrieve a maximum value?

Select one of the following:

  • TOP

  • MOST

  • UPPER

  • MAX

Explanation

Question 25 of 67

1

Which SQL statement is used to return only different (unique) values?

Select one of the following:

  • SELECT *

  • SELECT DISTINCT

  • SELECT DIFFERENT

  • SELECT UNIQUE

Explanation

Question 26 of 67

1

Which one of the following sorts rows in SQL?

Select one of the following:

  • ORDER BY

  • GROUP BY

  • ALIGN BY

  • SORT BY

Explanation

Question 27 of 67

1

Which of the following are the five built-in functions provided by SQL?

Select one of the following:

  • SUM,AVG,MULT,DIV,MIN

  • SUM,AVG,MIN,MAX,MULT

  • SUM,AVG,MIN,MAX,NAME

  • COUNT,SUM,AVG,MAX,MIN

Explanation

Question 28 of 67

1

Which of the following is the correct order of keywords for SQL SELECT statements?

Select one of the following:

  • FROM,WHERE,SELECT

  • SELECT,WHERE,FROM

  • WHERE,FROM,SELECT

  • SELECT,FROM,WHERE

Explanation

Question 29 of 67

1

Which SQL keyword is used to sort the result set?

Select one of the following:

  • ⦁ ORDER BY

  • ⦁ SORT

  • ⦁ FILTER

  • ⦁ SORT BY

Explanation

Question 30 of 67

1

Which of the following is NOT a relational algebra operators used in basic queries?

Select one of the following:

  • ⦁ Select

  • ⦁ Locate

  • ⦁ Project

  • ⦁ Join

Explanation

Question 31 of 67

1

Which of the following is not a SQL database manipulation statement?

Select one of the following:

  • ⦁ SELECT

  • ⦁ CREATE TABLE

  • ⦁ DELETE

  • ⦁ UPDATE

Explanation

Question 32 of 67

1

Which of the following SQL statements deletes all rows in table called SalesData?

Select one of the following:

  • ⦁ DELETE FROM SalesData

  • ⦁ DELETE * FROM SalesData

  • ⦁ DELETE ALL SalesData

  • ⦁ DELETE SalesData

Explanation

Question 33 of 67

1

Which of the following is an SQL aggregate function?

Select one of the following:

  • ⦁ ALTER

  • ⦁ MIN

  • ⦁ BETWEEN

  • ⦁ CREATE

Explanation

Question 34 of 67

1

Which of the following is not DML statement?

Select one of the following:

  • ⦁ UPDATE

  • ⦁ INSERT

  • ⦁ ALTER TABLE

  • ⦁ DELETE

Explanation

Question 35 of 67

1

With SQL, how do you select all the columns from a table named “Persons”?

Select one of the following:

  • ⦁ SELECT *.Persons;

  • ⦁ SELECT [all] FROM Persons;

  • ⦁ SELECT * FROM Persons;

  • ⦁ SELECT Persons;

Explanation

Question 36 of 67

1

With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

Select one of the following:

  • ⦁ SELECT * FROM Persons SORT BY ‘FirstName’ DESC;

  • ⦁ SELECT * FROM Persons ORDER BY FirstName DESC;

  • ⦁ SELECT * FROM Persons SORT ‘FirstName’ DESC;

  • ⦁ SELECT * FROM Persons ORDER FirstName DESC;

Explanation

Question 37 of 67

1

With SQL, how can you return the number of records in the “Persons” table?

Select one of the following:

  • ⦁ SELECT COLUMNS(*) FROM Persons

  • ⦁ SELECT COUNT() FROM Persons

  • ⦁ SELECT COLUMNS() FROM Persons

  • ⦁ SELECT COUNT(*) FROM Persons

Explanation

Question 38 of 67

1

With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter”?

Select one of the following:

  • ⦁ SELECT * FROM Persons WHERE FirstName = ‘Peter’

  • ⦁ SELECT [all] FROM Persons WHERE FirstName = ‘Peter’

  • ⦁ SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’

  • ⦁ SELECT * FROM Persons WHERE FirstName <> ‘Peter

Explanation

Question 39 of 67

1

With SQL, how do you select all the records from a table named “Persons” where the “FirstName” is ”Peter” and the “LastName” is “Jackson”?

Select one of the following:

  • ⦁ SELECT * FROM Persons WHERE LastName = ‘Jackson’;

  • ⦁ SELECT FirstName = ’Peter’, LastName = ‘Jackson’ FROM Persons;

  • ⦁ SELECT * FROM Persons WHERE FirstName <> ‘Peter’ AND LastName<>’Jackson’;

  • ⦁ SELECT * FROM Persons WHERE FirstName = ‘Peter’ AND LastName =’Jackson’;

Explanation

Question 40 of 67

1

How to select all data from student table starting the name from letter ’r’ ?

Select one of the following:

  • ⦁ SELECT * FROM student WHERE name LIKE ‘%’

  • ⦁ SELECT * FROM student WHERE name LIKE ‘%r’

  • ⦁ SELECT * FROM student WHERE name LIKE ‘r%’

  • ⦁ SELECT * FROM student WHERE name LIKE ‘%r%’

Explanation

Question 41 of 67

1

SQL query and data modification commands make up a(n)___

Select one of the following:

  • ⦁ DCL

  • ⦁ DDL

  • ⦁ DML

  • ⦁ TCL

Explanation

Question 42 of 67

1

DML is used to

Select one of the following:

  • ⦁ Add and delete tables

  • ⦁ Add/modify/delete data in the database

  • ⦁ Specify the structure of a database

  • ⦁ Manipulate the structure of database applications

Explanation

Question 43 of 67

1

If you want to apply second condition to your statement where both statements must be true, what keyword would you use between the conditions?

Select one of the following:

  • ⦁ AND

  • ⦁ TRUE

  • ⦁ WHERE

  • ⦁ BOTH

Explanation

Question 44 of 67

1

Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79

Select one of the following:

  • ⦁ SELECT *FROM weather WHERE humidity NOT BETWEEN 63 AND 79

  • ⦁ SELECT *FROM weather WHERE humidity BETWEEN 63 AND 79

  • ⦁ SELECT *FROM weather WHERE humidity = 63 to 79

  • ⦁ SELECT *FROM weather WHERE humidity 63 AND 79

Explanation

Question 45 of 67

1

Like operator uses __ and ___.

Select one of the following:

  • ⦁ Asterisk(*); percent sign(%)

  • ⦁ Question mark(?); asterisk(*)

  • ⦁ Percent sign(%); underscore(_)

  • ⦁ Underscore(_); question mark(?)

Explanation

Question 46 of 67

1

You can add a row using SQL in a database with which of the following?

Select one of the following:

  • ⦁ ADD

  • ⦁ MAKE

  • ⦁ INSERT

  • ⦁ CREATE

Explanation

Question 47 of 67

1

A subquery in an SQL SELECT statement is enclosed in:

Select one of the following:

  • ⦁ Braces - {…}

  • ⦁ CAPITAL LETTERS

  • ⦁ Parenthesis - (…)

  • ⦁ Brackets – […]

Explanation

Question 48 of 67

1

Which of the SQL statements is correct?

Select one of the following:

  • SELECT Username, Password WHERE Username = 'user1'

  • SELECT Username AND Password FROM Users

  • None of the given

  • SELECT Username, Password FROM Users

Explanation

Question 49 of 67

1

Which of the following is a DML statement?

Select one of the following:

  • DROP TABLE

  • ALTER TABLE

  • CREATE TABLE

  • SELECT

Explanation

Question 50 of 67

1

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

Select one of the following:

  • SELECT * FROM Persons WHERE FirstName='a';

  • SELECT * FROM Persons WHERE FirstName LIKE '%a';

  • SELECT * FROM Persons WHERE FirstName='%a%';

  • SELECT * FROM Persons WHERE FirstName LIKE 'a%';

Explanation

Question 51 of 67

1

What SQL structure is used to limit column values of a table?

Select one of the following:

  • None of the given

  • The VALUE constraint

  • The CHECK constraint

  • The LIMIT constraint

Explanation

Question 52 of 67

1

Which of the following is used to denote the projection operation in relational algebra?

Select one of the following:

  • Pi (Greek)

  • Lambda (Greek)

  • Omega (Greek)

  • Sigma (Greek)

Explanation

Question 53 of 67

1

To define what columns should be displayed in an SQL SELECT statement:

Select one of the following:

  • use USING to name the source table(s) and list the columns to be shown after WHERE.

  • use USING to name the source table(s) and list the columns to be shown after SELECT.

  • use FROM to name the source table(s) and list the columns to be shown after SELECT.

  • use SELECT to name the source table(s) and list the columns to be shown after USING.

Explanation

Question 54 of 67

1

In the query "SELECT address FROM users", what is the column being selected?

Select one of the following:

  • FROM

  • SELECT

  • address

  • users

Explanation

Question 55 of 67

1

Which of the following is used to denote the selection operation in relational algebra?

Select one of the following:

  • Sigma (Greek)

  • Pi (Greek)

  • Lambda (Greek)

  • Omega (Greek)

Explanation

Question 56 of 67

1

Which of the following SQL statements will select all records with all their columns from a table called Sales.

Select one of the following:

  • DELETE FROM Sales

  • None of the given

  • SELECT * FROM Sales

  • SELECT * FROM SALES WHERE OrderID < 1

Explanation

Question 57 of 67

1

To eliminate duplicate values in a column ______ is used

Select one of the following:

  • DISTINCT

  • NODUPLICATE

  • None of these

  • ELIMINATE

Explanation

Question 58 of 67

1

Which SQL functions is used to count the number of rows?

Select one of the following:

  • COUNTOF()

  • SUM()

  • COUNT()

  • NUMBER()

Explanation

Question 59 of 67

1

_____ specifies a search condition for a group or an aggregate function

Select one of the following:

  • ⦁ FROM Clause

  • ⦁ GROUP BY Clause

  • ⦁ HAVING Clause

  • ⦁ WHERE Clause

Explanation

Question 60 of 67

1

What will be the result of the following SQL statement: SELECT * FROM Table1 HAVING Column1 > 10

Select one of the following:

  • a. None of the given

  • b. The SQL statement will generate an error

  • c. The result will be empty data set

  • d. The result will be all rows from Table1 which have Column1 values greater than 10

Explanation

Question 61 of 67

1

The result of an SQL SELECT statement is a(n) _____

Select one of the following:

  • table

  • form

  • report

  • file

Explanation

Question 62 of 67

1

What keyword would you use to group your results by a column’s values?

Select one of the following:

  • ORDER BY

  • BY

  • JOIN

  • GROUP BY

Explanation

Question 63 of 67

1

With SQL, how do you select a column named “FistName” from a table named “Persons”?

Select one of the following:

  • SELECT FirstName FROM Persons;

  • SELECT Persons.FirstName

  • None of the given

  • EXTRACT FirstName FROM Persons

Explanation

Question 64 of 67

1

SQL can be used:

Select one of the following:

  • modify database data only

  • All of the given can be done by SQL

  • query database data only

  • create database structure only

Explanation

Question 65 of 67

1

Which SQL keyword is used to specify conditional search?

Select one of the following:

  • FIND

  • SELECT

  • WHERE

  • SEARCH

Explanation

Question 66 of 67

1

Which of the following is an SQL aggregate function

Select one of the following:

  • SELECT

  • JOIN

  • DISTINCT

  • AVG

Explanation

Question 67 of 67

1

In an SQL SELECT statement querying a single table, the asterisk(*) means that:

Select one of the following:

  • None of the given

  • all records meeting the full criteria are to be returned

  • all columns of the table are to be returned.

  • all records with even partial criteria met are to be returned

Explanation