Test
DatabaseDesignFinal
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (67)
1 The __operator returns all tuples in one relation that are not found in the other relation.
- ASelect
- BNone
- Cintersect
- Ddifference
2The__ operator combines all tuples from two relations excluding duplicates.
- AIntersect
- Bdifference
- Cunion
- Ddivide
3The HAVING clause does which of the following?
- AActs like a WHERE clause but HAVING is used for columns rather than groups.
- BActs like a WHERE clause but HAVING is used for rows rather than columns.
- CActs like a WHERE clause but HAVING is used for groups rather than rows.
- DActs EXACTLY like a WHERE clause.
4The NULL SQL keyword is used to…
- ARepresent 0 value
- BRepresent a missing or unknown value. NULL in SQL represents nothing.
- CRepresent positive infinity
- DRepresent negative infinity
5The SQL BETWEEN operator..
- ANone of the given
- BSpecifies which tables we are selecting from
- CSpecifies that a column is a primary key
- DSpecifies a range to test
6The AVG SQL function return the…
- AMaximum value from a column
- BAverage number of rows in all tables
- CAverage value in a column
- DThe sum of values in a column
7The command to remove row from CUSTOMER table is:
- AREMOVE FROM customer
- BDROP FROM customer
- CUPDATE FROM customer
- DDELETE FROM customer WHERE…
8What type of join is needed when you wish to include rows that do not have matching values?
- AOUTER and INNER JOIN
- BINNER JOIN
- COUTER JOIN
- DNone of the given
9What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT (Order)>5
- ASelects the total number of orders from the Sales table, if this number is greater than 5
- BSelects all customers with number of orders from table Sales that have made more than 5 orders
- CNone of the give
- DSelects all customers from the Sales table
10What operator tests column for the absence of data ?
- ANOT operator
- BIS NULL operator
- CEXIST operator
- DNone of the given
11What does the SQL FROM clause do?
- ASpecifies a search condition
- BNone of the given
- CSpecifies the columns we are retrieving
- DSpecifies the table to retrieve rows from
12What does follow after the SQL SELECT clause?
- ANone of the given
- BList of columns that will selected or the * symbol
- CSelection condition
- DThe name of the table we are selecting from
13What is the keyword you would use before adding conditions to your query?
- AEQUALS
- BWHAT
- CCONDITIONS
- DWHERE
14What is meant by the following relational statement STUDENT X COURSE ?
- ACompute the full outer join between the STUDENT and COURSE relations
- BCompute the left outer join between the STUDENT and COURSE relations
- CCompute the right outer join between the STUDENT and COURSE relations
- DCompute the cartesian between the STUDENT and COURSE relations
15What does follow after the SQL WHERE clause?
- AList of columns to be selected
- BNone of the given
- CName of the table we are selecting from
- DSelection condition
16What is meant by the term union compatibility?
- ANone
- BWhen two or more tables share the same (or compatible) domains
- CWhen two or more tables share the same number of columns and when they share the same domains
- DWhen two or more tables share the same number of columns
17What keyword can you use to search for a string in a column?
- AFIND STRING
- BLIKE
- CCONTAINS STRING
- DHAS STRING
18What is the meaning of LIKE ‘%0%0%’
- AFeature begins with the two 0’s
- BFeature ends with two 0’s
- CFeature has more than two 0’s
- DFeature has two 0’s in it, at any position
19What is the purpose of the SQL AS clause?
- AThe AS clause is used with the aggregate functions only
- BNone of the given
- CThe AS clause defines a search condition
- DThe 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
20Which product is returned in a join query have no join condition:
- ANone
- BEquijoins
- CBoth
- DCartesian
21Which SQL statement will selects all rows from a table called “Customers” and orders the result by “customer name” ?
- ASELECT * FROM Customers ORDERED customer_name
- BSELECT * FROM Customers ORDERED BY’ customer_name
- CSELECT * FROM Customers ORDER customer_name
- DSELECT * FROM Customers ORDER ON customer_name
22 Which SQL statement is used to extract data from a database?
- AEXTRACT
- BOPEN
- CSELECT
- DGET
23 Which of the following is a legal expression in SQL?
- ASELECT NULL FROM Employee;
- BSELECT name FROM Employee WHEN salary = NULL;
- CNone of the given
- DSELECT name FROM Employee;
24Which SQL keyword is used to retrieve a maximum value?
- ATOP
- BMOST
- CUPPER
- DMAX
25Which SQL statement is used to return only different (unique) values?
- ASELECT *
- BSELECT DISTINCT
- CSELECT DIFFERENT
- DSELECT UNIQUE
26Which one of the following sorts rows in SQL?
- AORDER BY
- BGROUP BY
- CALIGN BY
- DSORT BY
27Which of the following are the five built-in functions provided by SQL?
- ASUM,AVG,MULT,DIV,MIN
- BSUM,AVG,MIN,MAX,MULT
- CSUM,AVG,MIN,MAX,NAME
- DCOUNT,SUM,AVG,MAX,MIN
28Which of the following is the correct order of keywords for SQL SELECT statements?
- AFROM,WHERE,SELECT
- BSELECT,WHERE,FROM
- CWHERE,FROM,SELECT
- DSELECT,FROM,WHERE
29Which SQL keyword is used to sort the result set?
- A⦁ ORDER BY
- B⦁ SORT
- C⦁ FILTER
- D⦁ SORT BY
30Which of the following is NOT a relational algebra operators used in basic queries?
- A⦁ Select
- B⦁ Locate
- C⦁ Project
- D⦁ Join
31Which of the following is not a SQL database manipulation statement?
- A⦁ SELECT
- B⦁ CREATE TABLE
- C⦁ DELETE
- D⦁ UPDATE
32Which of the following SQL statements deletes all rows in table called SalesData?
- A⦁ DELETE FROM SalesData
- B⦁ DELETE * FROM SalesData
- C⦁ DELETE ALL SalesData
- D⦁ DELETE SalesData
33 Which of the following is an SQL aggregate function?
- A⦁ ALTER
- B⦁ MIN
- C⦁ BETWEEN
- D⦁ CREATE
34 Which of the following is not DML statement?
- A⦁ UPDATE
- B⦁ INSERT
- C⦁ ALTER TABLE
- D⦁ DELETE
35 With SQL, how do you select all the columns from a table named “Persons”?
- A⦁ SELECT *.Persons;
- B⦁ SELECT [all] FROM Persons;
- C⦁ SELECT * FROM Persons;
- D⦁ SELECT Persons;
36 With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?
- A⦁ SELECT * FROM Persons SORT BY ‘FirstName’ DESC;
- B⦁ SELECT * FROM Persons ORDER BY FirstName DESC;
- C⦁ SELECT * FROM Persons SORT ‘FirstName’ DESC;
- D⦁ SELECT * FROM Persons ORDER FirstName DESC;
37 With SQL, how can you return the number of records in the “Persons” table?
- A⦁ SELECT COLUMNS(*) FROM Persons
- B⦁ SELECT COUNT() FROM Persons
- C⦁ SELECT COLUMNS() FROM Persons
- D⦁ SELECT COUNT(*) FROM Persons
38 With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter”?
- A⦁ SELECT * FROM Persons WHERE FirstName = ‘Peter’
- B⦁ SELECT [all] FROM Persons WHERE FirstName = ‘Peter’
- C⦁ SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’
- D⦁ SELECT * FROM Persons WHERE FirstName <> ‘Peter
39 With SQL, how do you select all the records from a table named “Persons” where the “FirstName” is ”Peter” and the “LastName” is “Jackson”?
- A⦁ SELECT * FROM Persons WHERE LastName = ‘Jackson’;
- B⦁ SELECT FirstName = ’Peter’, LastName = ‘Jackson’ FROM Persons;
- C⦁ SELECT * FROM Persons WHERE FirstName <> ‘Peter’ AND LastName<>’Jackson’;
- D⦁ SELECT * FROM Persons WHERE FirstName = ‘Peter’ AND LastName =’Jackson’;
40 How to select all data from student table starting the name from letter ’r’ ?
- A⦁ SELECT * FROM student WHERE name LIKE ‘%’
- B⦁ SELECT * FROM student WHERE name LIKE ‘%r’
- C⦁ SELECT * FROM student WHERE name LIKE ‘r%’
- D⦁ SELECT * FROM student WHERE name LIKE ‘%r%’
41 SQL query and data modification commands make up a(n)___
- A⦁ DCL
- B⦁ DDL
- C⦁ DML
- D⦁ TCL
42 DML is used to
- A⦁ Add and delete tables
- B⦁ Add/modify/delete data in the database
- C⦁ Specify the structure of a database
- D⦁ Manipulate the structure of database applications
43 If you want to apply second condition to your statement where both statements must be true, what keyword would you use between the conditions?
- A⦁ AND
- B⦁ TRUE
- C⦁ WHERE
- D⦁ BOTH
44 Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79
- A⦁ SELECT *FROM weather WHERE humidity NOT BETWEEN 63 AND 79
- B⦁ SELECT *FROM weather WHERE humidity BETWEEN 63 AND 79
- C⦁ SELECT *FROM weather WHERE humidity = 63 to 79
- D⦁ SELECT *FROM weather WHERE humidity 63 AND 79
45 Like operator uses __ and ___.
- A⦁ Asterisk(*); percent sign(%)
- B⦁ Question mark(?); asterisk(*)
- C⦁ Percent sign(%); underscore(_)
- D⦁ Underscore(_); question mark(?)
46 You can add a row using SQL in a database with which of the following?
- A⦁ ADD
- B⦁ MAKE
- C⦁ INSERT
- D⦁ CREATE
47 A subquery in an SQL SELECT statement is enclosed in:
- A⦁ Braces - {…}
- B⦁ CAPITAL LETTERS
- C⦁ Parenthesis - (…)
- D⦁ Brackets – […]
48Which of the SQL statements is correct?
- ASELECT Username, Password WHERE Username = 'user1'
- BSELECT Username AND Password FROM Users
- CNone of the given
- DSELECT Username, Password FROM Users
49Which of the following is a DML statement?
- ADROP TABLE
- BALTER TABLE
- CCREATE TABLE
- DSELECT
50With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
- ASELECT * FROM Persons WHERE FirstName='a';
- BSELECT * FROM Persons WHERE FirstName LIKE '%a';
- CSELECT * FROM Persons WHERE FirstName='%a%';
- DSELECT * FROM Persons WHERE FirstName LIKE 'a%';
51What SQL structure is used to limit column values of a table?
- ANone of the given
- BThe VALUE constraint
- CThe CHECK constraint
- DThe LIMIT constraint
52Which of the following is used to denote the projection operation in relational algebra?
- APi (Greek)
- BLambda (Greek)
- COmega (Greek)
- DSigma (Greek)
53To define what columns should be displayed in an SQL SELECT statement:
- Ause USING to name the source table(s) and list the columns to be shown after WHERE.
- Buse USING to name the source table(s) and list the columns to be shown after SELECT.
- Cuse FROM to name the source table(s) and list the columns to be shown after SELECT.
- Duse SELECT to name the source table(s) and list the columns to be shown after USING.
54 In the query "SELECT address FROM users", what is the column being selected?
- AFROM
- BSELECT
- Caddress
- Dusers
55Which of the following is used to denote the selection operation in relational algebra?
- ASigma (Greek)
- BPi (Greek)
- CLambda (Greek)
- DOmega (Greek)
56Which of the following SQL statements will select all records with all their columns from a table called Sales.
- ADELETE FROM Sales
- BNone of the given
- CSELECT * FROM Sales
- DSELECT * FROM SALES WHERE OrderID < 1
57To eliminate duplicate values in a column ______ is used
- ADISTINCT
- BNODUPLICATE
- CNone of these
- DELIMINATE
58Which SQL functions is used to count the number of rows?
- ACOUNTOF()
- BSUM()
- CCOUNT()
- DNUMBER()
59_____ specifies a search condition for a group or an aggregate function
- A⦁ FROM Clause
- B⦁ GROUP BY Clause
- C⦁ HAVING Clause
- D⦁ WHERE Clause
60What will be the result of the following SQL statement: SELECT * FROM Table1 HAVING Column1 > 10
- Aa. None of the given
- Bb. The SQL statement will generate an error
- Cc. The result will be empty data set
- Dd. The result will be all rows from Table1 which have Column1 values greater than 10
61 The result of an SQL SELECT statement is a(n) _____
- Atable
- Bform
- Creport
- Dfile
62 What keyword would you use to group your results by a column’s values?
- AORDER BY
- BBY
- CJOIN
- DGROUP BY
63With SQL, how do you select a column named “FistName” from a table named “Persons”?
- ASELECT FirstName FROM Persons;
- BSELECT Persons.FirstName
- CNone of the given
- DEXTRACT FirstName FROM Persons
64SQL can be used:
- Amodify database data only
- BAll of the given can be done by SQL
- Cquery database data only
- Dcreate database structure only
65Which SQL keyword is used to specify conditional search?
- AFIND
- BSELECT
- CWHERE
- DSEARCH
66Which of the following is an SQL aggregate function
- ASELECT
- BJOIN
- CDISTINCT
- DAVG
67In an SQL SELECT statement querying a single table, the asterisk(*) means that:
- ANone of the given
- Ball records meeting the full criteria are to be returned
- Call columns of the table are to be returned.
- Dall records with even partial criteria met are to be returned
Información
- Descripción
- Test sobre DatabaseDesignFinal, creado por Dias Khalelov el 29/12/2016.
- Autor
- Dias Khalelov
- Idioma
- English
- Visitas
- 835
- Valoración
- 5,0 de 5 · 3 valoraciones Valora este test