baza_1
.docx1)Database is a collection of …
a)all of the above
2) DBMS stands for …
a)Database management systems
3) Phases of a database development are …
All of these
4) ER-diagrams are output from the … phase of Database Development.
a) Conceptual design
5) What do you need to consider when you make a database in SQL?
All of the above
6) The column of a table is referred to as the …
atribut
7) The another name for a row is …
Tuple
8) Through normalization data redundancy …
Good design
9) Types of update anomalies are …
Modification anomaly
Insertion anomaly
Deletion anomaly
10) A functional dependency is a relationship between or among …
Functional dependencies
11) The FD X->Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds.
No, the pk
12) The FD X->Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds.
At least one, pk
13) Which normal form is considered as a “good design” for relational database?
3nf
14) Normalization is …
Redandancy Dependence
15) Who proposed the relational model?
Edgar F. Codd
16) A relation in which the intersection of each row and column contains one and only one value is said to be in ...
1NF
17) A table in 1NF in which the primary key consists of two or more attributes …
UNF
18) A table that satisfies 2NF …
1NF
19) For a relation to be in 2NF, ... attribute must be fully functionally dependent on ... .
No, PK
20) For a relation to be in 3NF, it should not contain ... attribute that is transitively dependent on ... .
No, PK
21) SQL stands for …
Structured Query Language)
22) DDL stands for …
data definition language (DDL)
23) DML stands for …
a data manipulation language (DML).
24) DDL is used to …
defines constructs that structure the data in the database
25) Which of the SQL statements can be used to create a table?
Create table
26) DDL commands are …
Create, drop alter, rename, comment , truncate
27) What SQL structure is used to limit column values of a table?
check constraints
28) Which column properties specifies whether or not cells in a column must contain a data value?
No NULL constrraints
29) Unique constraint is used to …
ensure that values in columns are unique.
30) Numeric data types are …
-
Numeric (integers, floating points, etc)
-
Character strings (char, varchar, etc)
-
Bit strings (bit, blob, etc)
-
Temporal Data (date, time, timezone, timestamp, etc)
-
Boolean Data (true, false)
31) The statement in SQL which allows to change the definition of a table is …
Alter table
32) What SQL command can be used to delete columns from a table?
Drop table (alter table TABLE_NAME drop column column_name)
38) The command to eliminate a table from a database is …
Drop table
39) Data Manipulation Language is used for
insertion, modification, deletion, retrieval of information
40) The command to add a row in a table is …
Insert
41) Which SQL statement is used to update data in a database?
Update
42) In which of the SQL statements is the keyword SET used?
update table set attribute=value where condition
43) The command to remove rows from a table is …
Delete
44) The result of a SQL SELECT statement is a(n) …
Table
45) Which SQL statement is used to extract data from a database?
Select
46) What does follow after the SQL SELECT clause?
SELECT FROM WHERE
47) What does the SQL FROM clause do?
From table
48) Which SQL keyword is used to specify conditional search?
Where
49) What does follow after the SQL WHERE clause?
Seceltion condition
50) Correct order of keywords for SQL SELECT statements is …
Select from where
51) Relational algebra is …
is providing a theoretical foundation for relational databases.
52) Operations of relational algebra are
Min, Max, count, AVG, SUM
53) Projection selects …
PI(Greek)
54) The symbol for selection is …
Sigma(Greek(paint))
55) Selection selects …
Parenthesis
56) In an SQL SELECT statement querying a single table, the asterisk (*) means that …
Select from a table.
57) Join operation …
The join operation enables querying information from two or more related tables.
The most common form of a join is an equi-join. An equi-join combines two or more tables based on the tables’ primary and foreign keys.
58) Different types of JOIN command
INNER JOIN
OUTER JOIN:
-
LEFT JOIN
-
RIGHT JOIN
-
FULL JOIN
CROSS JOIN
59) What type of join is needed when you wish to include rows that do not have matching values?
OUTER JOIN
60) Union is …
Union (R1 U R2) is the relation containing all tuples that appear in R1, R2, or both.
62) Intersection is …
Intersection (R1 ∩ R2) is the relation containing all tuples that appear in both R1 and R2.
63) Set difference is …
Set difference (R1 - R2) is the relation containing all tuples of R1 that do not appear in R2.
64) Union-compatible …
Two tables must be union-compatible for the union operation to work.
-
They need to have same number of attributes (columns)
-
The domain of each attribute must also be the same.
65) What is the purpose of the SQL AS clause?
As clause ( long answer)Rename Alisher Aitty
66) Which SQL statement is used to return only different (unique) values?
Select Dist
67) The NULL SQL keyword is used to ...
I NULL is a special value that is valid for all domains.
NULL indicates absence of a value in a column.
Since NULL may appear in a column, we must be able to detect its presence.
68) The SQL BETWEEN operator …
For ranges
69) Choose the correct keyword for a range condition
Between
70) What keyword can you use to search for a string in a column?
Like
71) LIKE operator uses … and … .
% _
72) SQL aggregate functions are …
-
Min() selects the minimum value.
-
Max() selects the maximum value.
-
Avg() selects the average value.
-
Count() selects the number of occurrences.
-
Sum() selects the sum of occurrences.
73) Which SQL functions is used to count the number of rows in a SQL query?
Count(*)
74) The AVG SQL function returns the ...
average value.
75) What keyword would you use to group your results by a column's values?
Group By
76) The HAVING clause …
filtering groups
77) Which SQL keyword is used to sort the result set?
Order By
78) When sorting your results by a column's values that are integers, what keyword would you use to sort from greatest to least
DESC.
79) A subquery in an SQL SELECT statement is enclosed in …
Nested Query
80) Can you use the INSERT and SELECT clauses in one SQL statement?
YES, True
81) The IN and NOT IN operators can be used to …
Test simple set membership . used in subqueryes
82) A view is …
A view (“представление”, “вид”) is a table, derived from one or more defining tables.
83) For what purposes are views used?
Views can represent a subset of the data contained in a table.
84) What is a transaction?
A transaction is a sequence of database statements that needs to execute atomically, as a whole, in order to maintain database consistency.
85) Which of the following command makes the updates performed by the transaction permanent in the database?
Atomicity
86) The effect of the ROLLBACK command in a transaction is
is used to discard the updates of a transaction
87) Isolation levels are …
The isolation level of a transaction determines what data the transaction can see when other transactions are running concurrently
88) The most strict level of isolation is …
serializable
89) TCL stands for …
TCL (Transaction Control Language)
90) DCL stands for
DCL (Data Control Language)
91) A DBA is …
A database administrator (DBA) is the “super-user” of a database.
92) Privileges of a DBA are
A DBA can create users and grant users different privileges.
93) Commands of Data Control Language are…
Grant Revoke
94) In SQL GRANT command is used to …
We can grant privileges to users using the grant command
95) In SQL REVOKE command is used to
We may also revoke privileges from a user using the REVOKE command
The revoke command takes the same form as the grant command. That is,
REVOKE privilege list ON table FROM user;
So, if we wanted to remove the delete privilege from vinny on the member table, we would write:
REVOKE delete ON member FROM vinny;
96) Choose the command to create a new user
Create User;