TP Test Practice

Upload rules

Prepare your test before uploading

Spend one minute with the guide so questions, answer choices, correct answers and images import cleanly without extra manual fixes.

Read the guide

Test set

База по управлению

Programming · База по управлению .docx

Export

Flashcards

База по управлению

Choose a study flow.

Sequential mode

In order

No repeats

Mastery mode

Until correct

Repeat wrong

171questions
13review
9no answer
3attempts

Discussion

Comments, notes and shared explanations will appear here.

Teacher noteAttach hints to confusing questions.
Learner threadAsk why an answer is correct.
#1

Relational Algebra is a __________ query language that takes two relations as input and produces another relation as an output of the query

  1. Structural
  2. Relational
  3. Procedural
  4. Fundamental
#2

A relation is in 1NF if it doesn’t contain any_____________?

  1. Determinants
  2. Repeating groups
  3. Null values in primary key fields
  4. Functional dependencies
#3

A table is in 2NF if the table is in 1NF and what other conditions is met?

  1. There are no functional dependencies.
  2. There are no null values in primary key fields.
  3. There are no repeating groups.
  4. There are no attributes that a not functionally dependent on the relation’s primary key.
#4

When you normalize a relation by breaking it into two smaller relations, what must you do to maintain data integrity?

  1. Link the relations by a common field
  2. Remove any functional dependencies from both relations
  3. Assign both relations the same primary key field(s)
  4. Create key(s) for the old relation
#5

Which of the following statements is true:

  1. Normal forms can be derived by inspecting the data in various tables
  2. Normal forms speed up all queries
  3. Normal forms reduce the risk of inconsistent update of replicated dataitems
  4. Normal forms completely eliminate all redundant storage of dataitems
#6

First normal form prohibits the occurrence of

  1. Null values in a column
  2. Repeating group in a table
  3. Multiple candidate keys in a table
  4. Multiple foreign keys in a table
#7

If all non-keys in a table depend on the key, the whole key and nothing but the key, then the table is in

  1. 1NF, but not in 2NF
  2. 2NF, but not in 3NF
  3. 3NF
  4. BCNF
#8

When a part of a key determines a nonkey, it is a violation of

  1. First Normal Form
  2. Second Normal Form
  3. BCNF
  4. All of the above
#9 Review

Normal forms can be used with

  1. Relational data model
  2. Entity Relationship Model
  3. UML
#10

Can a software design tool identify functional dependencies?

  1. No
  2. yes
#11

Normalisation is:

  1. Removing all necessary data from a database
  2. Putting fields from different tables into one big database
  3. Organising a database to remove repeated entries and increase the accuracy of data
#12

Which one of these do you want to avoid in good database design?

  1. Redundancy!
  2. Third normal from
  3. Giant squid!
  4. Data!
#13

What is the purpose of normalisation?

  1. Eliminate redundant data
  2. Produce redundant data
  3. Reduce data consistencies
  4. Increase data inconsistencies
#14

How often should you issue the dump database command?

  1. Daily.
  2. Weekly.
  3. Monthly.
  4. Annually.
  5. It depends on the size of the database and the frequency of database changes.
#15

When is a trigger fired?

  1. When the trigger fire statement is executed
  2. Before data modification
  3. Before constraint validation
  4. After the transaction completes
  5. After constraint validation but before the transaction commits
#16

In client/server architecture, what is the normal purpose of a server?

  1. Format data for displaying to the end user
  2. Enforce data integrity
  3. Control the graphical user interface
  4. Supply the end user with automatic corrections to misspelled words as they are typed
#17

What does the TRUNCATE statement do?

  1. Removes the table
  2. Removes all rows from a table
  3. Shortens the table to 10 rows
  4. Removes all columns from a table
#18

Choose the right answer. Virtual table which gives the access to column subset from one or more tables, is:

  1. Cursor
  2. View
  3. Stored procedure
  4. Trigger
#19

Choose the right answer. Inner table structure, which is used by SQL-server for fast access to the rows and it shows the values of one or more columns is:

  1. Cursor
  2. View
  3. Stored procedure
  4. Trigger
#20

Which stored procedures you can get access from different servers if the users have the necessary permissions?

  1. user-defined
  2. system
  3. temporary
  4. extended
#21

Which stored procedures have the names, starting with “#” symbol and are deleted automatically by the connection termination of client with server?

  1. user-defined
  2. system
  3. temporary
  4. extended
#22

Which stored procedures have the names started with “sp_”? They provide different administrative tasks and help in SQL Server management. They are stored in msdb database

  1. user-defined
  2. system
  3. temporary
  4. extended
#23

Which command(-s) provide stored procedure execution?

  1. EXECUTE proc_name
  2. F5
  3. sp_help
  4. sp_dboption
#24

Choose the right answer. A group or set of T-SQL instructions and data manipulation language which are saved by one name and are used as a whole, is:

  1. cursor
  2. view
  3. stored procedure
  4. trigger
#25

Choose the right answer. Part of program which consists of T-SQL instructions, activated in response to definite actions, is:

  1. Table
  2. View
  3. Stored procedure
  4. Trigger
#26

Choose the right answer. Type of stored procedure which is automatically called in definite cases in the database:

  1. cursor
  2. view
  3. stored procedure
  4. trigger
#27

Choose the wrong answers. DML trigger runs each time when the data in the base table is changed by any operator:

  1. INSERT
  2. UPDATE
  3. DROP
  4. DELETE
#28

What should you do before backing up a database?

  1. Decide how often to back it up.
  2. Decide where you are backing it up to.
  3. Define the device on which you are backing it up.
  4. Determine dump frequency.
  5. All of the above
#29

What can you do while a database is being backed up?

  1. All normal processing.
  2. Anything that doesn’t affect the log.
  3. Queries only.
  4. All transactions, except non-logged operations.
  5. Absolutely nothing. All users are blocked during a backup.
#30

When would you restore a database?

  1. Daily
  2. Weekly
  3. During a database migration
  4. When prompted to do so by Server
#31

What is the object which is not grantable:

  1. login on the SQL server level
  2. login on the database level
  3. table on the scheme level
  4. application role
  5. endpoint
#32

The existence in the database of the procedure is checked using command:

  1. sp_help
  2. sp_helptext
  3. sp_helptextproc_name
  4. sp_helpproc_name
#33

Derive students’ ID, Full name, and email from the Student table with a high GPA of 3.8 or higher. The Student table includesID, Full name, address, email, and GPA.

  1. SELECT DISTINCT ID, Full name, address, email, GPA FROM student where gpa >= 3.8
  2. SELECT DISTINCT ID, Full name, email FROM student WHERE gpa >= 3.8
  3. SELECT * FROM student WHERE gpa >= 3.8
  4. SELECT DISTINCT ID, Full name, email FROM student WHERE gpa <= 3.8
#34

Select full name workers from the Workers table with id equal to 001, 002, 007, 009, and their position. The Workers table includesID, Full name, position, address, email, and phone number.

  1. SELECT * FROM workers WHERE id IN(001, 002, 007, 009)
  2. SELECT full name, ID, position FROM workers WHERE id =001, 002, 007, 009
  3. SELECT ID, Full name, position, address, email, phone number FROM workers WHERE id =001, 002, 007, 009
  4. SELECT full name, ID, position FROM workers WHERE id IN(001, 002, 007, 009)
#35

Select from the Employee table all records with salaries from 100 000 to 180 000 tenge. The Employee table includes employee_id, last_name, first_name, hire_date, salary, department_id

  1. SELECT*FROM Employee WHERE salary BETWEEN 100 000 AND 180 000
  2. SELECTemployee_id, last_name, first_name, salary FROMEmployee WHEREsalary>100 000 and salary<180 000
  3. SELECT*FROMEmployee WHEREsalary<100 000 and salary>180 000
  4. SELECT*FROMEmployee WHEREsalary =100 000 AND180 000
#36

Select records from the Product table so that product_name instead of name, product_price instead of price, product_type instead of type.

  1. SELECTnameASproduct_name, priceASproduct_price, typeASproduct_type FROMProduct
  2. SELECT* FROM Product WHERE nameASproduct_name, priceASproduct_price, typeASproduct_type
  3. SELECT* FROM Product nameASproduct_name, priceASproduct_price, typeASproduct_type
  4. SELECTnameASproduct_name, priceASproduct_price, typeASproduct_type FROMas Product
#37

Find the smallest salaries by department_id (department_id has its minimum salary).

  1. SELECT MIN(salary), department_id FROM employee GROUP BY salary
  2. SELECT MIN(department_id), salary FROM employee GROUP BY department_id
  3. SELECT salary, department_id FROM employee GROUP BY department_id
  4. SELECT MIN(salary), department_id FROM employee GROUP BY department_id
#38

Find the highest salaries by department_id (department_id has its maximum salary).

  1. SELECT Max(salary), department_id FROM employee GROUP BY salary
  2. SELECT Max(department_id), salary FROM employee GROUP BY department_id
  3. SELECT Max(salary), department_id FROM employee GROUP BY department_id
  4. SELECT salary, department_id FROM employee GROUP BY department_id
#39

Select all records from the product table so that only records with different prices get there

  1. SELECT DISTINCT price FROM product
  2. SELECT price FROM product GROUP BY product
  3. SELECT price FROM product order by priceASK
  4. SELECT price FROM product order by product DESC
#40

Select all records from the employee table so that only records with different salaries get there

  1. SELECT salary FROM employee GROUP BY employee
  2. SELECT salary FROM employee order by salary DESC
  3. SELECTDISTINCTsalaryFROMemployee
  4. SELECT salary FROM employee order by employee ASK
#41

Select a customer_id, address, and credit_limit from the customer table and sort the result by credit_limit in descending order

  1. SELECT DISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcredit_limitASC
  2. SELECTDISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcredit_limit DESC
  3. SELECT* FROMcustomer ORDERBYcredit_limit DESC
  4. SELECTDISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcustomer_id DESC
#42

Select a customer_id, address, and credit_limit from the customer table and sort the result by credit_limit in ascending order.

  1. SELECTDISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcredit_limit DESC
  2. SELECTDISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcredit_limitASC
  3. SELECT* FROMcustomer ORDERBYcredit_limit DESC
  4. SELECTDISTINCTcustomer_id, address, credit_limit FROMcustomer ORDERBYcustomer_idASC
#43

SELECT * FROM employee WHERE department_id = 100 AND salary > 2500;

  1. Table employee. Get a list of all employees from the 100th department (department_id) with a salary greater than 2500
  2. Employee table includes name, department_id, salary, and address. Get all recordsfrom the employee table with a salary greater than 2500
  3. Table employee. Get a list of all employees from the 100th employee (employee _id) with a salary of less than 2500
  4. Table employee. Get a list of all employees from the 100th department (department_id) with a salary of less than 2500
#44

SELECT *FROMStudent WHERElast_name LIKE'%d';

  1. Table student. Get a list of all students whose last letter in their last_name is 'd'
  2. Table student. Get a list of all students whose last letter in their first_name is 'd'
  3. Table student. Get a list of all students whose first letter in their last_name is "d".
  4. Table student. Get a list of all students who have a letter "d" in the middle of their last_name.
#45

Find a correctly composed task with EXCEPT statement:Select a book name from the Books 1 table that is not present in the Books 2 table. Book1 (ID, bname, type); Book2 (ID, , bname, type)

  1. SELECT bname FROM Book1 or NOT Book2;
  2. SELECT bname FROM Book1 EXCEPT FROM Book2;
  3. SELECT * FROM Book1 EXCEPT SELECT * FROM Book2;
  4. SELECT bname FROM Book1 EXCEPT SELECT bname FROM Book2;
#46

Find a correctly composed task with UNION statement: Find model numbers and types for PCs and laptops from the table of Products: The table Product(maker, model, type)

  1. SELECT model, type FROM Product WHERE type ='PC and Laptop'
  2. SELECT product FROM model, type WHERE type ='PC and Laptop'
  3. SELECT* FROM Product WHERE type ='PC' UNION SELECT model, type FROM Product WHERE type ='Laptop'
  4. SELECT model, type FROM Product WHERE type ='PC' UNION SELECT model, type FROM Product WHERE type ='Laptop'
#47

SELECT model, speed, hd FROM PC where price < 600 and ( cd = '12x' or cd = '24x' )

  1. Find all from PCs cheaper than $600 has a 12x or a 24x CD drive.
  2. Find the model number, speed, and hard drive capacity of PCs cheaper than $600 having a 12x or a 24x CD drive.
  3. Find the model number, speed, and hard drive capacity of PCs over $600 having a 12x or a 24x CD drive.
  4. Find the PCs cheaper than $600 having a 12x or a 24x CD drive.
#48

Select the group name from the groups table in which there are more boys than girls.The Groups table includesID, group_name, year, boys, and girls.

  1. SELECTgroup_nameFROMgroupsWHEREboys<girls
  2. SELECT group_name FROM groups WHERE boys > girls
  3. SELECT*FROM groups WHERE boys > girls
  4. SELECTgroupsFROMgroup_nameWHERE boys > girls
#49

When selecting from the employee table, add 1 year to the date.

  1. SELECT DATE_ADD(date, INTERVAL1YEAR) as date FROMemployee
  2. SELECT DATEDIFF (date, INTERVAL1YEAR) as date FROM employee
  3. SELECT ADD(date, INTERVAL1YEAR) as date FROM employee
  4. SELECTDATE_ADD(1YEAR) as date FROM employee
#50

Select from the SHIPS table records with id equals 11, 12, 13, 25, 24.

  1. SELECTshipsFROM SHIPS WHERE id IN(11, 12, 13, 25, 24)
  2. SELECT id IN(11, 12, 13, 25, 24) FROM SHIPS
  3. SELECT*FROM SHIPS WHERE id IN(11, 12, 13, 25, 24)
  4. SELECT*FROM SHIPS WHERE id 11, 12, 13, 25, 24
#51

Choose the correct condition: SELECTSUM(salary) FROM employee WHERE id IN(11, 12, 13, 25, 24)

  1. Find the total salary in the employee table for id 11, 12, 13, 25, 24.
  2. Find employees by id 11, 12, 13, 25, 24 and their salary in the table of employee.
  3. Find employees by id 11, 12, 13, 25, 24 and their average salary in the employee table.
  4. find the average salary in the employee table for id 11, 12, 13, 25, 24.
#52

Find in the table employee the total salary for people aged 25 to 30.

  1. SELECTAVG(salary) FROMemployeeWHERE age BETWEEN25AND30
  2. SELECT * from employeeWHERE SUM(salary), age BETWEEN25AND30
  3. SELECTSUM(salary) FROMemployeeWHERE age BETWEEN25AND30
  4. SELECT * from employeeSUM(salary)WHERE age =25AND30
#53

Select answer with which you can give permission to INSERT, DELETE , UPDATE , SELECT table ‘Solary’ for user 'Zer0':

  1. GRANT * FROM Solary WHERE username LIKE ‘%Zer0%’
  2. CREATE Permission SELECT, UPDATE, DELETE, INSERT FOR ‘Zer0’ TO ‘Solary’
  3. GRANT SELECT, INSERT, UPDATE, DELETE ON ‘Solary’ TO ‘Zer0’
  4. GRANT SELECT, INSERT, UPDATE, DELETE FROM ‘Solary’ WHERE username LIKE ‘%Zer0%’
#54

Decipher the abbreviation DCL

  1. Database control license
  2. Data consistency law
  3. Data controllogic
  4. Data control language
#55

What command is not a part of the DDL category

  1. TRUNCATE
  2. SELECT
  3. CREATE
  4. DROP
#56

What command is not a part of the DCL category

  1. GRANT
  2. REVOKE
  3. DENY
  4. UPDATE
#57

What is the difference between CREATE and ALTER

  1. There is no difference
  2. ALTER command needs explicit privileges, while CREATE doesn’t
  3. They belong to the different categories of the commands
  4. CREATE creates an object, ALTER alters the object
#58

What condition is NOT needed in order to use the ALTER command

  1. The altering object needs to exist
  2. The user must have the permissions to perform the alter command
  3. The user must specify the correct name for the altering object
  4. The database structure must comply the rules for using the alter command
#59

The CREATE command can be used only to create tables and databases

  1. True
  2. False
#60

What is the main purpose of using the GRANT command

  1. To give the permissions to the certain users
  2. To give the permissions to the certain operations
  3. To take away the rights from the certain users
  4. To take away the rights to the certain operations
#61

What privileges can be given to the users in SQL

  1. SELECT, INSERT, DELETE
  2. TRIGGER, PROCEDURE
  3. DATABASE, TABLE
  4. USER, DATABASE OWNER
#62

What is the default syntax of GRANT command

  1. GRANTpermission1, permission2 … ON object_name TO username
  2. GRANT permission ON object_name
  3. GRANT PERMISSION TO username
  4. GRANT PERMISSIONS permission1, permission2 ON object_name TO username
#63

The REVOKE command is mainly used for

  1. To grant the permissions to the certain users
  2. To grant the permissions to the certain operations
  3. To take away the rights from the certain users
  4. To take away the rights to the certain operations
#64

What is the syntax of the TRUNCATE command

  1. TRUNCATE TABLE table_name;
  2. TRUNCATE DATABASE database_name;
  3. TRUNCATE table_name;
  4. TRUNCATE database_name;
#65

While creating a table with CREATE command, how can you specify that some fields mustn’t contain the NULL value

  1. NOT NULL
  2. DEFAULT
  3. NULL
  4. CHECK
#66

Find the error in the command below: createtable Students Info ( ID int, NAME varchar(20), SUBJECT varchar(20) );

  1. You can’t specify the length for the data type int
  2. “create table” must be written in uppercase
  3. You must specify the database in the query
  4. Table name cannot contain spaces
#67

While creating the table, how do you specify the data type of the field

  1. By omitting the data type, so it will be automatically specified
  2. By writing the data type name and length after the field name
  3. By writing the data type before the column name
  4. By writing the data type after table name
#68

You need to create an Employees table with the fields id, full name, age, email, phone.

  1. CREATE TABLE `employee` (`Id` INT NOT NULL,`full_name` VARCHAR(100) NOT NULL,`age` INT NOT NULL,`email` VARCHAR(50) NOT NULL,`phone` VARCHAR(50) NOT NULL,PRIMARY KEY (`Id`));
  2. CREATE DATABASE `employee` (`Id` INT NOT NULL,`full_name` VARCHAR NOT NULL,`age` INT NOT NULL,`email` VARCHAR NOT NULL,`phone` VARCHAR NOT NULL);
  3. CREATE TABLE ‘employee’ (‘id’ varchar(50) NOT NULL,’full_name` VARCHAR NOT NULL,`age` INT NOT NULL,`email` VARCHAR NOT NULL,`phone` VARCHAR NOT NULL );
  4. CREATE TABLE employee (id,full_name, age, email, phone);
#69

The user 'Zer0 ' has full privileges on the Employees, Departments, and Salary tables. You need to restrict the rights to the Departments table so that the user wouldnt be able to Modify and Delete existing data.

  1. DELETE PERMISSION FROM Departments TO ‘Zer0’ WHERE permission LIKE ‘%UPDATE%’ AND permission LIKE ‘%DELETE%’
  2. UNGRANT UPDATE, DELETE ON Departments TO ‘Zer0’
  3. SELECT ‘Zer0’; DELETE Permission ON Departments; PERMISSION = ‘UPDATE, DELETE’
  4. REVOKE UPDATE , DELETE ON Department TO ‘Zer0’
#70

Find the error in the command below

  1. The variable ‘name’ is not specified in the procedure params
  2. You can notcreate procedures with select statements inside
  3. The JOIN operator is used incorrectly
  4. The pattern in LIKE operatorcan not contain several ‘%’
#71

Given the code below

  1. The trigger Products_INSERTexists in the database, therefore it cannot be created
  2. The name of the trigger can’t contain underscore
  3. The trigger can not be added to the table which doesn’t exist in the database
  4. The database wasn’t specified for the trigger
#72

Select the option with the answer where the user 'Zer0' is not allowed to add or select from the Department table:

  1. UNGRANT * FROM DEPARTMENT WHERE username LIKE ‘%Zer0%’
  2. DELETE Permission SELECT, INSERT FOR ‘Zer0’ TO ‘Department’
  3. DENY INSERT, SELECT ON ‘Department’ TO ‘Zer0’
  4. UPDATE SELECT, INSERT, UPDATE, DELETE FROM ‘Department’ WHERE username LIKE ‘%Zer0%’
#73 Review

What does the following procedure do:

image1.png
  1. Procedure deletes the row for the given id
  2. Procedure returns all rows from the customer table
  3. Procedure inserts a new customer
  4. Procedure returns the entire row for the given id
#74

Retrieve all data from the table office {id, locations, name}

  1. Select *from office;
  2. Select from office;
  3. Select name from office;
  4. Select *form office;
#75

sName,sAddress(Student) is equal to?

  1. SELECT Sname FROM Students
  2. SELECT Sname, SAddress FORM Students
  3. SELECT Sname and SAddress FROM Students
  4. SELECT Sname, SAddress FROM Student
#76

Define an union

  1. combines the result set of two or more select statements
  2. returns all rows from the left table (1) and from the right table (2)
  3. returns all rows from the right table (2), with the matching rows in the right table (1)
  4. returns all rows from the left table (1), with the matching rows in the right table (2)
#77

Find the SQL statement that is equal to: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';

  1. SELECT NAME IN CUSTOMER WHERE STATE IN 'VA';
  2. SELECT NAME IN CUSTOMER WHERE STATE = 'VA';
  3. SELECT NAME FROM CUSTOMER WHERE STATE IN 'VA';
  4. SELECT NAME IN CUSTOMER WHERE STATE = 'V';
#78

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Students table?

  1. Update persons set lastname = 'hansen' into lastname = 'nilsen'
  2. Update students set lastname = 'hansen' into lastname = 'nilsen'
  3. Update persons set lastname = 'hansen' where lastname = 'nilsen'
  4. Update students set lastname = 'nilsen' where lastname = 'hansen'
#79

how to Add a new column into existing table?

  1. ALTER TABLE Student MODIFY COLUMN sDegree CHAR(64) NOT NULL
  2. ALTER TABLE Student ADD COLUMN sDegree VARCHAR(64) NOT NULL
  3. ALTER TABLE S ADD COLUMN s VACHAR(64) NOT NULL
  4. ALTER TABLE Student DROP COLUMN sDegree VARCHAR(64) NOT NULL
#80

how to change the row(s) in a table

  1. insert
  2. update
  3. change
  4. delete
#81

how to remove the row(s) from a table

  1. insert
  2. update
  3. change
  4. delete
#82

how to rename a column in existing table?

  1. ALTER TABLE Student MODIFY COLUMN sDegree CHAR(64) NOT NULL
  2. ALTER TABLE Student CHANGE COLUMN sDegree Degree VARCHAR(64) NOT NULL
  3. ALTER TABLE Student RENAME COLUMN s to SS VACHAR(64) NOT NULL
  4. ALTER TABLE Student DROP COLUMN sDegree VARCHAR(64) NOT NULL
#83

In E\R diagrams, we will represent Attributes as

  1. Boxes with rounded corners
  2. Links between two entities
  3. Ovals
  4. Diamond box
#84

In E\R diagrams, we will represent Entities as

  1. Boxes with rounded corners
  2. Links between two entities
  3. Ovals
  4. Diamond box
#85

In E\R diagrams, we will represent Relationships as

  1. Boxes with rounded corners
  2. Links between two entities
  3. Ovals
  4. Diamond box
#86

Many to many relationships are difficult to represent in database, so we need to

  1. Split many to many relationship into two one to many relationships
  2. Split one to many relationship into two one to many relationships
  3. Split many to many relationship into one to many relationships
  4. Split many to many relationship into three one to many relationships
#87

Please increase salary for 10%?

  1. UPDATE Employee SET Salary = Salary*0.5
  2. UPDATE Employee SET Salary = Salary * 0.1
  3. UPDATE Employee SET Salary = Salary * 1.1
  4. UPDATE Employee Update Salary = Salary*0.1
#88

Please remove staff, who earns more than 22000?

  1. DELETE FROM Employee WHERE Salary >=22000;
  2. DELETE FROM Employe WHERE Salary => 22000;
  3. REMOVE FROM Employee WHERE Salary >22000;
  4. DELETE FROM Employee WHERE Salary = 22000;
#89

Retrieve office id from the table office {id, locations, name}

  1. Select *from office;
  2. Select id from office;
  3. Select name from office;
  4. Select id form office;
#90

SQL can be used to

  1. create database structures only
  2. query database data only
  3. modify database data only
  4. All of the these can be done by SQL
#91

SQL data definition commands make up a(n)

  1. DDC
  2. DML
  3. DDL
  4. DDD
#92

SQL stands for

  1. Sequence Quuestion Language
  2. Structured Query Language
  3. Structured Querty Language
  4. Selection Query Language
#93

The ___________ operation, denoted by −, allows us to find tuples that are in one relation but are not in another.

  1. Union
  2. Difference
  3. Selection
  4. Intersection
#94

The command to eliminate a table from a database

  1. Drop
  2. Delete
  3. Remove
  4. Update
#95

The command to remove rows from a table "Customer"

  1. Remove from Customer
  2. Delete from Customer
  3. Drop from Customer
  4. Update row from Customer
#96

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

  1. Report
  2. Table
  3. Form
  4. File
#97

The OR operator displays a record if ANY conditions listed are true.

  1. True
  2. false
#98

The AND operator displays a record if ALL of the conditions listed are true

  1. True
  2. false
#99

M:M connection type is not available in the data model:

  1. object-oriented
  2. hierarchical
  3. network
  4. multivariate
  5. post-relational
#100

Integrity control of the relationships is maintained automatically in the data model:

  1. hierarchical
  2. object-oriented
  3. network
  4. relational
  5. multivariate
#101

Record-"Descendant" can’t have many of records, "ancestors" in the data model:

  1. hierarchical
  2. object-oriented
  3. network
  4. post-relational
  5. multivariate
#102

"Entity - Relationship" scheme is an example of a data model:

  1. object-oriented
  2. object-relational
  3. relational
  4. multivariate
  5. post-relational
#103

Which model is an extension of the relational model and removes restrictions of indivisibility of the data stored in the records in the tables?

  1. multivariate
  2. object-relational
  3. network
  4. post-relational
  5. relational
#104

Which of data models is designed for online analytical processing?

  1. relational
  2. multivariate
  3. object-oriented
  4. object-relational
  5. post-relational
#105

Which of the data models is the most understandable to the customer and convenient for designing a database from scratch?

  1. relational
  2. multivariate
  3. object-oriented
  4. network
  5. post-relational
#106

Which of these models is based not on records?:

  1. relational
  2. hierarchical
  3. object-oriented
  4. network
  5. multivariate
#107

What gives the result of the combination of entities?

  1. E/R scheme
  2. supertype
  3. relation
  4. attribute
#108

Which of the following means the entity property?

  1. subtype
  2. scheme E/ R
  3. supertype
  4. attribute
#109

Which functional component controls matches in the database?

  1. database manager
  2. file manager
  3. disk manager
  4. database administrator
  5. administrator
#110

Who is responsible for the design, maintenance and database security?

  1. application developer
  2. database administrator
  3. database manager
  4. user
#111

Which of the actions in the design of a relational database is not included in the stage of deployment?

  1. DBMS selection and purchase
  2. The transformation of the conceptual model to the real
  3. Creating of the Data Dictionary
  4. Testing and maintenance of the database
#112

What is the last stage in relational database design?

  1. Determine requirements
  2. Database testing and maintenance
  3. Conceptual design
  4. Deployment
#113

Who is the primary user of the database or who is the database intended for?

  1. database manager
  2. database administrator
  3. user
  4. application developer
  5. database developer
#114

To ensure good quality of the database design you should not adhere to one of the rules:

  1. Each table must have unique name
  2. Each table should store data of one entity type
  3. Avoid the NULL column
  4. Avoid repeating values or columns
  5. Each table should store data of different entity types
#115

In which system database all information about specific server configuration is stored, particularly about data of registered users, databases, configuration options of the system and remote servers:

  1. Master
  2. TempDB
  3. Model
  4. MSDB
  5. Purpose
#116

Which of the following are necessary for the communication compatibility between the two tables?

  1. Attributes with the same data type
  2. Attributes with unique data
  3. Attributes with different data types
#117

What is the state which requires duplication to provide mutual independence of multi-value attributes?

  1. Denormalization
  2. Multi-value dependency
  3. Multi-value independency
  4. Concretization
  5. Generalization
#118

In case of a SELECT statement which includes a WHERE clause, where is the GROUP BY clause statement placed?

  1. Immediately after the SELECT clause
  2. After the WHERE clause
  3. After the ORDER BY clause
  4. Before the WHERE clause
#119

Which of the following is an attribute of a key that could have been a primary key but wasn’t chosen by it?

  1. alternative
  2. foreign
  3. possible /candidate/
  4. composite
  5. no such attribute
#120

Which of these objects is a set of values​​, based on which one or more attributes are retrieve their actual values​​?

  1. domain
  2. entity
  3. relation
  4. supertype
#121

Some attributes(or set of attributes)that uniquely identifies a row in the table is the key:

  1. possible
  2. primary
  3. alternative
  4. composite
  5. foreign
#122

Which method of selecting the primary key isn’t optimal:

  1. The primary key must be numeric.
  2. The primary key must consist of a single column.
  3. The primary key should not be changed with time.
  4. Primary key must be meaningless.
  5. The primary key must not be numeric.
#123

The operator creates a relation consisting of tuples belonging to both relations.

  1. selection
  2. intersection
  3. union
  4. cross join
  5. subtraction
#124

The operator selects the sample tuples or rows from relation, based on the condition.

  1. selection
  2. intersection
  3. union
  4. cross join
  5. division
#125

The operator creates all possible combinations of tuples, taken one by one from each of the two relations:

  1. selection
  2. intersection
  3. union
  4. left, right, full join
  5. cross join
#126

The operator forms the relation from two relations, taken in pairs from each relation and satisfied the condition:

  1. selection
  2. intersection
  3. union
  4. left, right, full join
  5. cross join
#127

The operator selects the attributes or columns from the relation.

  1. division
  2. subtraction
  3. projection
  4. intersection
  5. cross join
#128

The operator generates relation of tuples belonging to the first, but absent in the second of the two relations.

  1. division
  2. subtraction
  3. projection
  4. intersection
  5. cross join
#129

Which operator can split the data of one table into the data of another table?

  1. division
  2. subtraction
  3. projection
  4. intersection
  5. cross join
#130

Which operator can collect the data of two tables into one table, provided that the number of columns is the same and the data types in these columns are the same?

  1. selection
  2. intersection
  3. union
  4. left, right, full join
  5. cross join
#131

The preferred method of defaulting a value in a column is:

  1. To use a constraint
  2. To use a default
  3. Write the application code currently
  4. None of the above
  5. All of the above
#132 Review

A ? B .

image2.png
  1. SELECT * FROM A LEFT JOIN B ON A.a=B.е
  2. SELECT * FROM A LEFT JOIN B ON A.a=B.d
  3. SELECT * FROM A RIGHT JOIN B ON A.a=B.d
  4. SELECT * FROM A INNER JOIN B ON A.a=B.d
#133

The syntax for creating a View:

  1. Create View ViewName SELECT * FROM TableName
  2. Create View ViewName AS SELECT * FROM TableName
  3. Create View ProcName SELECT * FROM ViewName
  4. Create Procedure ProcedureName AS BEGIN Procedure Body END
#134

Following code

  1. Naming the user-defined stored procedures
  2. tored procedure with parameters
  3. Executing the procedure
  4. Stored procedure without parameter
#135

Which of these options are NOT correct way to call a Stored Procedure in SQL Server?

  1. EXEC Values
  2. EXECUTE ProcedureName VALUES
  3. ProcedureName VALUES
  4. EXEC ProcedureName VALUES
#136

Which of these options are NOT correct way to delete a Stored Procedure in SQL Server?:

  1. DROP PROCEDURE ProcedureName
  2. Delete PROCEDURE ProcedureName
  3. Drop proc spGetEmployee1
  4. Drop Procedure spGetEmployee1
#137

The parameters of a Stored Procedure:

  1. Simple, complex
  2. Updatable, non-updatable
  3. Defined, undefined
  4. Input, output
#138 Review

Output of the following code:

image3.png image4.png image5.png image6.png image7.png
#139 Review

Output of the following code:

image8.png image9.png image10.png image11.png image12.png
#140 Review

Output of the following code:

image13.png image14.png image15.png image16.png image17.png
#141 Review

Output of the following code:

image18.png image19.png image20.png image21.png image22.png
#142 Review

Output of the following code:

image23.png image24.png image25.png image26.png image27.png
#143 Review

Output of the following code:

image28.png image29.png
#144 Review

Example of a stored procedure with default value:

image30.png image31.png image32.png image33.png
#145 Review

Example of a stored procedure calling another procedure:

image34.png image35.png image36.png
#146

A stored procedure that gets the names, gender, and the dob of all teachers from the table Teachers table:

  1. CREATE PROCEDURE spGetTeachers AS BEGIN Select t_name, t_surname, t_course from Teachers END
  2. CREATE PROCEDURE spGetEmployee AS BEGIN Select t_name, t_gender and dob from Employee END
  3. CREATE PROCEDURE spGetTeachers AS BEGIN Select t_name, DOB from Teachers END
  4. CREATE PROCEDURE spGetTeachers AS BEGIN Select t_name, t_gender, dob from Teachers END
#147

Types of views:

  1. Simple, complex
  2. Reusable, non-reusable
  3. Defined, undefined
  4. Input, output
#148

A view created based on a single table but with distinct/ aggregate function/ group by clause/ having clause/ calculated columns/ set operations is considered to be a:

  1. Simple view
  2. Dependent view
  3. Complex view
  4. Stored procedure
#149

A keyword used for procedure modification:

  1. ALTER
  2. CHANGE
  3. DROP
  4. CREATE
#150 Review

Following code is an example of:

image37.png
  1. Stored procedure with parameters
  2. Stored procedure without parameters
  3. Executing the procedure
  4. Checking the procedure
#151

What does the following procedure do:

  1. Procedure deletes the row for the given id
  2. Procedure returns all rows from the customer table
  3. Procedure inserts a new customer
  4. Procedure returns the entire row for the given id
#152 Review

What does the following procedure do:

image38.png
  1. Procedure deletes the row for the given id
  2. Procedure returns all rows from the customer table
  3. Procedure inserts a new customer
  4. Procedure returns the entire row for the given id
    image39.png
  5. SELECT * FROM A FULL JOIN B ON A.a=B.c
  6. SELECT * FROM A FULL JOIN B ON A.b=B.c
  7. SELECT * FROM A RIGHT JOIN B ON A.a=B.d
  8. SELECT * FROM A INNER JOIN B ON A.a=B.c
    image40.png
  9. SELECT * FROM A RIGHT JOIN B on A.b=B.d
  10. SELECT * FROM A INNER JOIN B on A.b=B.d
  11. SELECT * FROM A LEFT JOIN B on A.b=B.d
  12. SELECT * FROM A INNER JOIN B on A.a=B.c
    image41.png
  13. SELECT А.a, В.a FROM A , B
  14. SELECT А.a, В.c FROM A CROSS JOIN B
  15. SELECT * FROM A CROSS JOIN B
  16. SELECT А.a, В.d FROM A , B
    image42.png
  17. SELECT *FROM A LEFT JOIN B ON A.a=B.c
  18. SELECT *FROM A RIGHT JOIN B ON A.a=B.c
  19. SELECT *FROM A FULL JOIN B ON A.a=B.c
  20. SELECT *FROM A LEFT JOIN B ON A.b=B.c
    image43.png
  21. SELECT * FROM A FULL JOIN B ONA.b=B.e
  22. SELECT A.*, B.c,e FROM AINNER JOIN B ON A.b=B.e
  23. SELECT A.*, B.c,e FROM A FULL JOIN B ON A.b=B.e
  24. SELECT * FROM AINNER JOIN B ONA.a=B.e
    image44.png
  25. SELECT * FROM A FULL JOIN B ON A.b=B.e
  26. SELECT * FROM A FULL JOIN B ON A.a=B.e
  27. SELECT * FROM A INNER JOIN B ON A.b=B.e
  28. SELECT * FROM A LEFT JOIN B ON A.b=B.e
    image45.png
  29. SELECT * FROM A LEFT JOIN B ON A.b=B.e
  30. SELECT * FROM A LEFT JOIN B ON A.a=B.a
  31. SELECT * FROM A INNER JOIN B ON A.b=B.e
  32. SELECT * FROM A INNER JOIN B ON A.a=B.c
    image46.png
  33. SELECT * FROM A FULL JOIN B ON A.a=B.d
  34. SELECT * FROM A LEFT JOIN B ON A.a=B.b
  35. SELECT * FROM A RIGHT JOIN B ON A.a=B.d
  36. SELECT * FROM A INNER JOIN B ON A.a=B.d
    image47.png
  37. SELECT * FROM A RIGHT JOINB ON A.a=B.c
  38. SELECT * FROM A LEFT JOINB ON A.a=B.c
  39. SELECT * FROM A RIGHT JOINB ON A.b=B.e
  40. SELECT * FROM A LEFT JOINB ON A.b=B.e
    image48.png
  41. SELECT * FROM A , A
  42. SELECT А.a, В.c FROM A CROSS JOIN B
  43. SELECT * FROM A CROSS JOIN B
  44. А.a, В.d FROM A , B
#153

What is the scientific method of splitting of the complex table structures on the simple table structures by definite rules?

  1. Concretization
  2. Normalization
  3. Generalization
  4. Denormalization
  5. Functional dependence
#154

Result of samplinga subsetfromthe high-level entityset to forma lower level entity setis:

  1. specification
  2. normalization
  3. generalization
  4. denormalization
  5. functional dependence
#155

What is the relation type of functional dependencies?

  1. М : 1
  2. 1 : 1
  3. М : М
  4. There is no any relation
#156

What is used for normalization reducing?

  1. E/R scheme
  2. Primary and foreign keys
  3. Decomposition without redundancy
  4. Bottom-up method
  5. Generalization
#157

In which type of below normal forms each determinant in relation is possible key?

  1. 1NF.
  2. 2NF.
  3. 3NF.
  4. BCNF.
  5. 4NF.
#158

Which of the followingis the resultof combining two ormore low-levelentity setsto create higher levelentity set?

  1. relation
  2. specification
  3. supertype
  4. generalization
  5. normalization
#159

What is the type of NF, if the table is in previous NF and doesn’t have multi-value dependencies?

  1. DKNF
  2. BCNF
  3. 4NF
  4. 5NF
  5. There is no such NF
#160

What is the reason of the anomalies insertion in the database?

  1. Redundancy
  2. Concretization
  3. Relations between entities
  4. Functional dependency
  5. Normalization
#161

Which of the following statements are true about normalization?

  1. Normalization is used to reduce the number of tables in a database.
  2. Normalization can remove redundant data from the database.
  3. Normalization simplifies select statements.
  4. Most databases are in fifth normal form.
#162

The opposite method for specification in ER is:

  1. identification
  2. normalization
  3. denormalization
  4. generalization
  5. simplification
#163

What type of NF aren’t based on functional dependency ?

  1. 1NF
  2. 2NF, 3NF
  3. BCNF,4NF
  4. 5NF, DKNF
  5. All NF
#164

Which of the following NF has no transitive functional dependencies?

  1. DKNF
  2. 3NF
  3. 2NF
  4. 1NF
  5. BCNF
#165

What functional dependency requires for functional definition of the other attributes?

  1. Requires the attribute to be the key
  2. Doesn’t require the attribute to be the key
  3. Requires the attribute not to be the key
  4. Doesn’t require the attribute not to be the key
  5. There is no any relation between key and functional dependency
#166

What is the type of NF, when and only when the determinant in the table is possible key?

  1. 3NF
  2. 2NF
  3. 1NF
  4. BCNF
#167

What is the type of Normal Form, which is based on defining the keys and attribute domains?

  1. DKNF
  2. 3NF
  3. 2NF
  4. BCNF
#168

What is the type of NF, if the table has previous NF and each not key attribute functionally depends on only Primary Key?

  1. DKNF
  2. 3NF
  3. 2NF
  4. 1NF
  5. BCNF
#169

What is the type of NF, if the table has previous NF and each attribute functionally depends on all key, not only on part of the key?

  1. DKNF
  2. 3NF
  3. 2NF
  4. 1NF
  5. BCNF
#170

Logical database design is:

  1. Generalization and Relation
  2. Relation
  3. Normalization and E/R
  4. Functional relation
  5. Concretization
#171

If A attribute in relation to B attribute is functionally depends on it, what is the name of B attribute?

  1. Alternative key
  2. Determinant
  3. Possible key
  4. Compound key
  5. There is no such key