DatabaseDesignFinal

Descrição

Quiz sobre DatabaseDesignFinal, criado por Dias Khalelov em 29-12-2016.
Dias Khalelov
Quiz por Dias Khalelov, atualizado more than 1 year ago
Dias Khalelov
Criado por Dias Khalelov mais de 7 anos atrás
801
2

Resumo de Recurso

Questão 1

Questão
The __operator returns all tuples in one relation that are not found in the other relation.
Responda
  • Select
  • None
  • intersect
  • difference

Questão 2

Questão
The__ operator combines all tuples from two relations excluding duplicates.
Responda
  • Intersect
  • difference
  • union
  • divide

Questão 3

Questão
The HAVING clause does which of the following?
Responda
  • 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.

Questão 4

Questão
The NULL SQL keyword is used to…
Responda
  • Represent 0 value
  • Represent a missing or unknown value. NULL in SQL represents nothing.
  • Represent positive infinity
  • Represent negative infinity

Questão 5

Questão
The SQL BETWEEN operator..
Responda
  • None of the given
  • Specifies which tables we are selecting from
  • Specifies that a column is a primary key
  • Specifies a range to test

Questão 6

Questão
The AVG SQL function return the…
Responda
  • Maximum value from a column
  • Average number of rows in all tables
  • Average value in a column
  • The sum of values in a column

Questão 7

Questão
The command to remove row from CUSTOMER table is:
Responda
  • REMOVE FROM customer
  • DROP FROM customer
  • UPDATE FROM customer
  • DELETE FROM customer WHERE…

Questão 8

Questão
What type of join is needed when you wish to include rows that do not have matching values?
Responda
  • OUTER and INNER JOIN
  • INNER JOIN
  • OUTER JOIN
  • None of the given

Questão 9

Questão
What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT (Order)>5
Responda
  • 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

Questão 10

Questão
What operator tests column for the absence of data ?
Responda
  • NOT operator
  • IS NULL operator
  • EXIST operator
  • None of the given

Questão 11

Questão
What does the SQL FROM clause do?
Responda
  • Specifies a search condition
  • None of the given
  • Specifies the columns we are retrieving
  • Specifies the table to retrieve rows from

Questão 12

Questão
What does follow after the SQL SELECT clause?
Responda
  • None of the given
  • List of columns that will selected or the * symbol
  • Selection condition
  • The name of the table we are selecting from

Questão 13

Questão
What is the keyword you would use before adding conditions to your query?
Responda
  • EQUALS
  • WHAT
  • CONDITIONS
  • WHERE

Questão 14

Questão
What is meant by the following relational statement STUDENT X COURSE ?
Responda
  • 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

Questão 15

Questão
What does follow after the SQL WHERE clause?
Responda
  • List of columns to be selected
  • None of the given
  • Name of the table we are selecting from
  • Selection condition

Questão 16

Questão
What is meant by the term union compatibility?
Responda
  • 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

Questão 17

Questão
What keyword can you use to search for a string in a column?
Responda
  • FIND STRING
  • LIKE
  • CONTAINS STRING
  • HAS STRING

Questão 18

Questão
What is the meaning of LIKE ‘%0%0%’
Responda
  • 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

Questão 19

Questão
What is the purpose of the SQL AS clause?
Responda
  • 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

Questão 20

Questão
Which product is returned in a join query have no join condition:
Responda
  • None
  • Equijoins
  • Both
  • Cartesian

Questão 21

Questão
Which SQL statement will selects all rows from a table called “Customers” and orders the result by “customer name” ?
Responda
  • 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

Questão 22

Questão
Which SQL statement is used to extract data from a database?
Responda
  • EXTRACT
  • OPEN
  • SELECT
  • GET

Questão 23

Questão
Which of the following is a legal expression in SQL?
Responda
  • SELECT NULL FROM Employee;
  • SELECT name FROM Employee WHEN salary = NULL;
  • None of the given
  • SELECT name FROM Employee;

Questão 24

Questão
Which SQL keyword is used to retrieve a maximum value?
Responda
  • TOP
  • MOST
  • UPPER
  • MAX

Questão 25

Questão
Which SQL statement is used to return only different (unique) values?
Responda
  • SELECT *
  • SELECT DISTINCT
  • SELECT DIFFERENT
  • SELECT UNIQUE

Questão 26

Questão
Which one of the following sorts rows in SQL?
Responda
  • ORDER BY
  • GROUP BY
  • ALIGN BY
  • SORT BY

Questão 27

Questão
Which of the following are the five built-in functions provided by SQL?
Responda
  • SUM,AVG,MULT,DIV,MIN
  • SUM,AVG,MIN,MAX,MULT
  • SUM,AVG,MIN,MAX,NAME
  • COUNT,SUM,AVG,MAX,MIN

Questão 28

Questão
Which of the following is the correct order of keywords for SQL SELECT statements?
Responda
  • FROM,WHERE,SELECT
  • SELECT,WHERE,FROM
  • WHERE,FROM,SELECT
  • SELECT,FROM,WHERE

Questão 29

Questão
Which SQL keyword is used to sort the result set?
Responda
  • ⦁ ORDER BY
  • ⦁ SORT
  • ⦁ FILTER
  • ⦁ SORT BY

Questão 30

Questão
Which of the following is NOT a relational algebra operators used in basic queries?
Responda
  • ⦁ Select
  • ⦁ Locate
  • ⦁ Project
  • ⦁ Join

Questão 31

Questão
Which of the following is not a SQL database manipulation statement?
Responda
  • ⦁ SELECT
  • ⦁ CREATE TABLE
  • ⦁ DELETE
  • ⦁ UPDATE

Questão 32

Questão
Which of the following SQL statements deletes all rows in table called SalesData?
Responda
  • ⦁ DELETE FROM SalesData
  • ⦁ DELETE * FROM SalesData
  • ⦁ DELETE ALL SalesData
  • ⦁ DELETE SalesData

Questão 33

Questão
Which of the following is an SQL aggregate function?
Responda
  • ⦁ ALTER
  • ⦁ MIN
  • ⦁ BETWEEN
  • ⦁ CREATE

Questão 34

Questão
Which of the following is not DML statement?
Responda
  • ⦁ UPDATE
  • ⦁ INSERT
  • ⦁ ALTER TABLE
  • ⦁ DELETE

Questão 35

Questão
With SQL, how do you select all the columns from a table named “Persons”?
Responda
  • ⦁ SELECT *.Persons;
  • ⦁ SELECT [all] FROM Persons;
  • ⦁ SELECT * FROM Persons;
  • ⦁ SELECT Persons;

Questão 36

Questão
With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?
Responda
  • ⦁ 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;

Questão 37

Questão
With SQL, how can you return the number of records in the “Persons” table?
Responda
  • ⦁ SELECT COLUMNS(*) FROM Persons
  • ⦁ SELECT COUNT() FROM Persons
  • ⦁ SELECT COLUMNS() FROM Persons
  • ⦁ SELECT COUNT(*) FROM Persons

Questão 38

Questão
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter”?
Responda
  • ⦁ 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

Questão 39

Questão
With SQL, how do you select all the records from a table named “Persons” where the “FirstName” is ”Peter” and the “LastName” is “Jackson”?
Responda
  • ⦁ 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’;

Questão 40

Questão
How to select all data from student table starting the name from letter ’r’ ?
Responda
  • ⦁ 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%’

Questão 41

Questão
SQL query and data modification commands make up a(n)___
Responda
  • ⦁ DCL
  • ⦁ DDL
  • ⦁ DML
  • ⦁ TCL

Questão 42

Questão
DML is used to
Responda
  • ⦁ Add and delete tables
  • ⦁ Add/modify/delete data in the database
  • ⦁ Specify the structure of a database
  • ⦁ Manipulate the structure of database applications

Questão 43

Questão
If you want to apply second condition to your statement where both statements must be true, what keyword would you use between the conditions?
Responda
  • ⦁ AND
  • ⦁ TRUE
  • ⦁ WHERE
  • ⦁ BOTH

Questão 44

Questão
Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79
Responda
  • ⦁ 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

Questão 45

Questão
Like operator uses __ and ___.
Responda
  • ⦁ Asterisk(*); percent sign(%)
  • ⦁ Question mark(?); asterisk(*)
  • ⦁ Percent sign(%); underscore(_)
  • ⦁ Underscore(_); question mark(?)

Questão 46

Questão
You can add a row using SQL in a database with which of the following?
Responda
  • ⦁ ADD
  • ⦁ MAKE
  • ⦁ INSERT
  • ⦁ CREATE

Questão 47

Questão
A subquery in an SQL SELECT statement is enclosed in:
Responda
  • ⦁ Braces - {…}
  • ⦁ CAPITAL LETTERS
  • ⦁ Parenthesis - (…)
  • ⦁ Brackets – […]

Questão 48

Questão
Which of the SQL statements is correct?
Responda
  • SELECT Username, Password WHERE Username = 'user1'
  • SELECT Username AND Password FROM Users
  • None of the given
  • SELECT Username, Password FROM Users

Questão 49

Questão
Which of the following is a DML statement?
Responda
  • DROP TABLE
  • ALTER TABLE
  • CREATE TABLE
  • SELECT

Questão 50

Questão
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"?
Responda
  • 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%';

Questão 51

Questão
What SQL structure is used to limit column values of a table?
Responda
  • None of the given
  • The VALUE constraint
  • The CHECK constraint
  • The LIMIT constraint

Questão 52

Questão
Which of the following is used to denote the projection operation in relational algebra?
Responda
  • Pi (Greek)
  • Lambda (Greek)
  • Omega (Greek)
  • Sigma (Greek)

Questão 53

Questão
To define what columns should be displayed in an SQL SELECT statement:
Responda
  • 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.

Questão 54

Questão
In the query "SELECT address FROM users", what is the column being selected?
Responda
  • FROM
  • SELECT
  • address
  • users

Questão 55

Questão
Which of the following is used to denote the selection operation in relational algebra?
Responda
  • Sigma (Greek)
  • Pi (Greek)
  • Lambda (Greek)
  • Omega (Greek)

Questão 56

Questão
Which of the following SQL statements will select all records with all their columns from a table called Sales.
Responda
  • DELETE FROM Sales
  • None of the given
  • SELECT * FROM Sales
  • SELECT * FROM SALES WHERE OrderID < 1

Questão 57

Questão
To eliminate duplicate values in a column ______ is used
Responda
  • DISTINCT
  • NODUPLICATE
  • None of these
  • ELIMINATE

Questão 58

Questão
Which SQL functions is used to count the number of rows?
Responda
  • COUNTOF()
  • SUM()
  • COUNT()
  • NUMBER()

Questão 59

Questão
_____ specifies a search condition for a group or an aggregate function
Responda
  • ⦁ FROM Clause
  • ⦁ GROUP BY Clause
  • ⦁ HAVING Clause
  • ⦁ WHERE Clause

Questão 60

Questão
What will be the result of the following SQL statement: SELECT * FROM Table1 HAVING Column1 > 10
Responda
  • 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

Questão 61

Questão
The result of an SQL SELECT statement is a(n) _____
Responda
  • table
  • form
  • report
  • file

Questão 62

Questão
What keyword would you use to group your results by a column’s values?
Responda
  • ORDER BY
  • BY
  • JOIN
  • GROUP BY

Questão 63

Questão
With SQL, how do you select a column named “FistName” from a table named “Persons”?
Responda
  • SELECT FirstName FROM Persons;
  • SELECT Persons.FirstName
  • None of the given
  • EXTRACT FirstName FROM Persons

Questão 64

Questão
SQL can be used:
Responda
  • modify database data only
  • All of the given can be done by SQL
  • query database data only
  • create database structure only

Questão 65

Questão
Which SQL keyword is used to specify conditional search?
Responda
  • FIND
  • SELECT
  • WHERE
  • SEARCH

Questão 66

Questão
Which of the following is an SQL aggregate function
Responda
  • SELECT
  • JOIN
  • DISTINCT
  • AVG

Questão 67

Questão
In an SQL SELECT statement querying a single table, the asterisk(*) means that:
Responda
  • 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

Semelhante

Cap. 01 - Sistemática e Classificação Biológica
renpv
Glossário de Biologia Geral
Alessandra S.
Revolução Francesa
cm lopes
Principais Temas para estudar Geografia
Marina Faria
História da Filosofia - Período Socrático (fácil)
Daniel Vieira Inácio
Questionário - Tabela Periódica dos Elementos
corinasaldanha
CONTABILIDADE GERAL
MJPD
Conhecimentos algébricos
Sem Parar
Gute Gewohnheiten erfolgreicher Schüler
miminoma
REVISÃO DO ENS FUNDAMENTAL
Paulo César R. Silva
Reino Plantae
Ricardo l.