wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Деректер қоры туралы тест

Total questions: 153

Worksheet time: 1hrs 22mins

Name
Class
Date
1.

What is a database (DB)?

a)

Data storage device

b)

A system that stores data in a structured way

c)

A collection of only text files

d)

A random storage place for data

e)

Only an online information base

2.

What is the purpose of a database management system (DBMS)?

a)

To play games online

b)

To protect data

c)

To store, modify, and manage data

d)

To speed up the computer

e)

To compress files

3.

Give an example of a DBMS:

a)

Windows

b)

Oracle

c)

Photoshop

d)

CorelDraw

e)

Linux

4.

What is a relational database?

a)

A DB based on relationships between tables

b)

A graphical database

c)

A system of text files

d)

A base of programming codes

e)

A base of websites

5.

What is an attribute?

a)

A row in a table

b)

A column in a table

c)

A collection of tables

d)

The server of a database

e)

A DBMS application

6.

What is a record?

a)

All values of one column

b)

A set of all attribute values in one row

c)

The name of a table

d)

The type of a database

e)

A query of a database

7.

What element describes a column in a table?

a)

Attribute

b)

Record

c)

Key

d)

Value

e)

Normal form

8.

What is a group of objects defined by the same attribute values called?

a)

Record

b)

Attributes

c)

Key

d)

Index

e)

Transaction

9.

The main structural element of a database:

a)

Column

b)

Row

c)

Table

d)

Relation

e)

Attribute

10.

Which element defines the logical structure of a database?

a)

Database server

b)

Query

c)

ER diagram

d)

Memory size

e)

File size

11.

What is a 'Primary key'?

a)

The main attribute of a table

b)

A unique identifier that does not repeat in a table

c)

The name of a table

d)

Type of query

e)

Type of data

12.

What is used to prevent duplicate values in a table?

a)

Attribute

b)

Index

c)

Unique key

d)

Query

e)

Locking

13.

A key that references another table in the same table:

a)

Primary key

b)

Foreign key

c)

Super key

d)

Candidate key

e)

Composite key

14.

The main functions of a DBMS:

a)

Creating a website

b)

Storing, searching, updating, deleting data

c)

Printing documents

d)

Drawing diagrams

e)

Editing videos

15.

What is SQL?

a)

Programming language

b)

Database query language

c)

Network architecture

d)

Graphical interface

e)

Driver package

16.

What is an ER model?

a)

Electronic relational model

b)

A model describing objects and their relationships

c)

The physical structure of a database

d)

Programming code

e)

Website template

17.

What does a rectangle represent in an ER diagram?

a)

Relationship

b)

Attribute

c)

Query

d)

Entity

e)

Index

18.

What does a diamond represent in an ER diagram?

a)

Attribute

b)

Relationship

c)

Entity

d)

Key

19.

What does the diamond represent in an ER diagram?

a)

Attribute

b)

Relationship

c)

Entity

d)

Key

e)

Column

20.

What does the ellipse represent in an ER diagram?

a)

Attribute

b)

Entity

c)

Relationship

d)

Table

e)

Request

21.

What type of relationship occurs when a record in one table corresponds to multiple records in another table?

a)

1:1

b)

1:M

c)

M:1

d)

M:N

e)

0:M

22.

How is a 'Many-to-Many' relationship described?

a)

One record points to only one record

b)

Multiple records relate to multiple records

c)

One record does not relate anywhere

d)

One record is divided into multiple attributes

e)

One key is divided into multiple columns

23.

What does Entity mean in an ER model?

a)

Database server

b)

Real or abstract object

c)

Relationship between tables

d)

Data type

e)

SQL query

24.

What does each Entity describe?

a)

Keys

b)

Attributes

c)

Tables

d)

Indexes

e)

Functions

25.

What does a Primary Key define?

a)

Set of unique attributes

b)

Multiple relationships

c)

Foreign key

d)

Normalization level

e)

Number of records

26.

What is a Weak entity?

a)

An object that cannot create a key independently

b)

An object that combines all attributes

c)

Multiple relationships

d)

A physical server

e)

A table without normal form

27.

How does a Weak entity relate?

a)

Through Primary key

b)

Through Foreign key

c)

Through attribute

d)

Through SQL query

e)

Through index

28.

What is the purpose of a 'linking table' in a many-to-many relationship?

a)

To copy data

b)

To link two tables

c)

To store data

d)

To encrypt data

e)

To index

29.

What is a relationship attribute?

a)

An attribute specific to one table

b)

An attribute that describes the relationship

c)

A unique attribute

d)

A key attribute

e)

An external attribute

30.

What does 'Participation' mean in an ER model?

a)

Choosing attributes

b)

Degree of participation of objects in the relationship

c)

Merging records

d)

Storing data

e)

Defining keys

31.

If one Entity is independent of another Entity, what type of Entity is it?

a)

Weak entity

b)

Strong entity

c)

Composite entity

d)

Derived entity

e)

External entity

32.

How is a key attribute marked in an ER diagram?

a)

Colored black

b)

Underlined

c)

Dotted line

d)

Surrounded by a border

e)

Marked with a star

33.

What is a 'Derived attribute'?

a)

Main attribute

b)

Attribute derived from other values

c)

Unique key attribute

d)

Record identifier

e)

Attribute that is only stored

34.

What is the purpose of using an ER model?

a)

To visually represent the structure of a database

b)

For programming

c)

To design a computer network

d)

To create a website

e)
35.

What is the purpose of the ER model?

a)

To visually represent the structure of data

b)

For programming

c)

To design computer networks

d)

To create websites

e)

To open text files

36.

Name the types of participation in multiple relationships.

a)

Mandatory and optional

b)

Primary and secondary

c)

Main and additional

d)

Individual and shared

e)

First and second

37.

How many entities can one relationship contain?

a)

Only 1

b)

Only 2

c)

Two or more

d)

Only 3

e)

Only 4

38.

What is a key?

a)

A method of encoding data

b)

An attribute or set of attributes that uniquely identifies records in a table

c)

An algorithm for encrypting data

d)

The name of the database

e)

A type of DBMS

39.

A key consisting of a set of unique values:

a)

Primary key

b)

Foreign key

c)

Composite key

d)

Candidate key

e)

Alternate key

40.

Composite key

a)

A key consisting of only one attribute

b)

A key consisting of a combination of multiple attributes

c)

Foreign key

d)

Index key

e)

Column key

41.

Candidate key

a)

Only one attribute

b)

All possible keys with uniqueness property in the table

c)

A method of grouping data

d)

Related attributes

e)

A type of unique index

42.

How many candidate keys can a table have if it can only have one primary key?

a)

Only one

b)

None

c)

One or more

d)

Only two

e)

Only three

43.

What function does a foreign key serve?

a)

Encrypts data

b)

Links one table to another

c)

Copies tables

d)

Sorts data

e)

Sets an index

44.

What is a super key?

a)

A key that shows the names of all tables

b)

A set of attributes that ensures unique identification

c)

A list of foreign keys

d)

A method of indexing

e)

A type of function

45.

Which type of attribute cannot be a key?

a)

Unique attribute

b)

Numeric attribute

c)

Constant attribute

d)

Foreign attribute

e)

Attribute that can accept null values

46.

The main property of a unique key in a table

a)

Can be repeated multiple times

b)

Can accept null values

c)

Does not repeat for each record

d)

Is only for numeric values

e)

Always relates to a foreign key

47.

What types of attributes are there?

a)

Numeric and textual

b)

Primary and secondary

c)

Simple and complex

d)

Internal and external

e)

Initial and final

48.

What is a composite attribute?

a)

An attribute that can accept multiple values

b)

A numeric attribute

c)

An attribute unrelated to a unique key

d)

An attribute consisting of multiple simple attributes

e)

An external attribute

49.

What type of attribute can accept multiple values at once?

a)

Simple attribute

b)

External attribute

c)

Unique attribute

d)

Key attribute

e)

Multivalued attribute

50.

Derived attribute

4 lines
51.

What type of attribute can accept multiple values?

a)

Simple attribute

b)

External attribute

c)

Unique attribute

d)

Key attribute

e)

Multivalued attribute

52.

Example of a derived attribute?

a)

User's name

b)

Country code

c)

City name

d)

Age calculated from birth date

e)

Identifier number

53.

What attributes should a primary key consist of?

a)

Must accept NULL values

b)

Complex and encrypted

c)

Complex and external

d)

Foreign attributes

e)

Unique and must not accept NULL values

54.

If uniqueness is ensured only when combining two or more attributes, what type of key is it?

a)

Primary key

b)

Foreign key

c)

Composite key

d)

Alternate key

e)

Derived key

55.

What is normalization?

a)

Data encryption method

b)

Data storage device

c)

Process of optimizing data structure

d)

Data visualization

e)

Data encoding

56.

What is the main goal of normalization?

a)

Freeing up memory

b)

Creating indexes

c)

Increasing speed

d)

Reducing data redundancy and ensuring integrity

e)

Reducing network traffic

57.

How many levels does normalization consist of?

a)

1

b)

2

c)

3 and above

d)

5

e)

6

58.

What is the condition for the first normal form (1NF)?

a)

Attributes can be repeated

b)

Multiple values must be stored

c)

Attributes must be grouped

d)

Attributes must be fragmented

e)

Attributes must be atomic

59.

If there are duplicate data in a table, which normalization rule does it violate?

a)

1NF

b)

2NF

c)

3NF

d)

BCNF

e)

4NF

60.

What needs to be done to achieve the second normal form (2NF)?

a)

Split the table in two

b)

All attributes must be fully dependent on the primary key

c)

Combine all attributes

d)

Set indexes on all attributes

e)

Copy the data

61.

What issues does the second normal form address?

a)

Duplicate records

b)

Data encryption

c)

Data encoding

d)

Data visualization

e)

Network connection

62.

What is the condition for the third normal form (3NF)?

a)

Attributes must be mutually dependent

b)

Attributes must only depend on the primary key

c)

Attributes must be repeated

d)

Attributes must be separated

e)

Data must not be stored

63.

What is transitive dependency?

a)

Independence of one attribute from another

b)

Dependency of one attribute on another through a key

c)

Sum of attributes

d)

Merging data

e)

Indexing data

64.

What does 3NF normalization prevent?

a)

Data encoding

b)

Data indexing

c)

Transitive dependency of data

d)

Data duplication

e)

Data loss

65.

What issue does BCNF (Boyce-Codd Normal Form) focus on?

(a)  

66.

What issue does NF (Boyce-Codd Normal Form) focus on?

a)

Reducing the number of attributes

b)

Saving memory

c)

Ensuring all dependencies are based on keys

d)

Encrypting data

e)

Strengthening network connections

67.

What is the difference between BCNF and 3NF?

a)

BCNF requires all determinants to be keys

b)

BCNF resolves transitive dependencies

c)

3NF only identifies keys

d)

3NF removes all relationships

e)

Both are the same

68.

If a table is in 3NF, which normalization rules does it follow?

a)

Only 1NF

b)

None

c)

Only 2NF

d)

Only BCNF

e)

1NF and 2NF

69.

What should not be present in the first normal form?

a)

Multiple values should not be stored in one cell

b)

Indexes should not be present

c)

Data should be repeated

d)

Data should not be encrypted

e)

Data should be combined

70.

What issue does 4NF aim to solve?

a)

Transitive dependency

b)

Multivalued dependency

c)

Combining attributes

d)

Optimizing indexes

e)

Quick data delivery

71.

What situation arises when there is a multivalued dependency?

a)

One attribute depends on several other attributes

b)

All attributes depend on the primary key

c)

Attributes are fully separated

d)

Attributes are encrypted

e)

Data is deleted

72.

What normalization problem does 5NF solve?

a)

Data duplication

b)

Data being stored separately

c)

Indexing data

d)

Encoding data

e)

Protecting data

73.

What is denormalization?

a)

Completion of normalization

b)

Data encryption

c)

Data merging

d)

Improving performance by lowering normalization level

e)

Data visualization

74.

When is denormalization used?

a)

To enhance data security

b)

To ensure quick data access

c)

To complicate the system

d)

To encode data

e)

To reduce attributes

75.

What is the first step of normalization?

a)

Indexing data

b)

Data visualization

c)

Data copying

d)

Making data atomic

e)

Grouping data

76.

What is SQL?

a)

A language for working with databases

b)

A programming language

c)

A data protection system

d)

A data visualization tool

e)

A data encryption algorithm

77.

What is the full name of SQL?

a)

Structured Question Language

b)

Simple Query Language

c)

Structured Query Language

d)

Server Query Language

e)

Standard Query Logic

78.

Which SQL command is used to select data?

a)

UPDATE

b)

DELETE

c)

SELECT

d)

INSERT

e)

CREATE

79.

Which SQL command is used to select data?

a)

UPDATE

b)

DELETE

c)

SELECT

d)

INSERT

e)

CREATE

80.

Which keyword is used to sort data in a SELECT query?

a)

ORDER BY

b)

GROUP BY

c)

HAVING

d)

WHERE

e)

FROM

81.

What word is added to reverse the order of sorting?

a)

ASC

b)

DESC

c)

FIRST

d)

LAST

e)

INVERSE

82.

Which SQL command is used to update data?

a)

INSERT

b)

ALTER

c)

SELECT

d)

DELETE

e)

UPDATE

83.

Which command is used to delete data?

a)

SELECT

b)

UPDATE

c)

DELETE

d)

DROP

e)

REMOVE

84.

Which command is used to add new data in SQL?

a)

INSERT INTO

b)

UPDATE

c)

SELECT

d)

DROP

e)

CREATE

85.

Which keyword is used to set conditions in SQL?

a)

ORDER

b)

GROUP

c)

HAVING

d)

WHERE

e)

SET

86.

Which command is used to create a table in SQL?

a)

CREATE TABLE

b)

MAKE TABLE

c)

NEW TABLE

d)

ADD TABLE

e)

SET TABLE

87.

Which command is used to drop a table in SQL?

a)

REMOVE

b)

CLEAR TABLE

c)

DELETE TABLE

d)

ERASE TABLE

e)

DROP TABLE

88.

Which operators are used to combine multiple conditions in SQL?

a)

AND and OR

b)

IF and ELSE

c)

TRUE and FALSE

d)

WHILE and FOR

e)

CASE and WHEN

89.

Which operator is used to make a query within a specific range of data in SQL?

a)

LIKE

b)

ALL

c)

IN

d)

ANY

e)

BETWEEN

90.

Which operator is used for pattern matching in SQL?

a)

FIND

b)

SEARCH

c)

LIKE

d)

SCAN

e)

FILTER

91.

Which operator is used to group results?

a)

ORDER BY

b)

UNION

c)

HAVING

d)

JOIN

e)

GROUP BY

92.

What operation is used to combine two or more tables in SQL?

a)

MERGE

b)

ATTACH

c)

COMBINE

d)

GATHER

e)

UNION

93.

What does INNER JOIN mean?

a)

Combine all records

b)

Combine records with common values

c)

Copy all data

d)

Transform one table into another

e)

Delete data

94.

What data is returned as a result of a LEFT JOIN?

a)

Only data from the left table

b)

Only data from the right table

c)

Only matching data

d)

No data is returned

e)

All tables

95.

Which operator limits the number of records in SQL?

a)

LIMIT

b)

TOP

c)

FIRST

d)

OFFSET

e)

MIN

96.

Which operator is used to set conditions on grouped data in SQL?

a)

WHERE

b)

GROUP BY

c)

ORDER BY

d)

HAVING

e)

LIMIT

97.

The first step in database design:

a)

Creating tables

b)

Analyzing data requirements

c)

Adding indexes

d)

Writing SQL queries

e)

Migrating data

98.

What is determined first during database design?

a)

User interface

b)

SQL syntax

c)

Server IP address

d)

Network security

e)

Data structure

99.

What is determined first when designing a database?

a)

User interface

b)

SQL syntax

c)

Server IP address

d)

Network security

e)

Structure of data

100.

At which stage is it determined how to store data?

a)

Writing code

b)

Visualizing data

c)

Indexing data

d)

Physical design

e)

Encrypting data

101.

At what step are relationships between data defined?

a)

Logical design

b)

Physical design

c)

Writing SQL queries

d)

Creating modules

e)

Conducting tests

102.

What is the purpose of an ER diagram (Entity-Relationship Diagram)?

a)

To launch the program

b)

To show relationships between data

c)

To encrypt data

d)

To index data

e)

To store data

103.

What is an attribute?

a)

Name of the database

b)

Type of data encryption

c)

User identifier

d)

Method of data copying

e)

Description of an object

104.

What is a primary key?

a)

Field that uniquely identifies a record in a table

b)

Data encryption tool

c)

Data search tool

d)

Data sorting method

e)

Data encoding method

105.

What is a foreign key used for?

a)

To encrypt data

b)

To sort data

c)

To show relationships between tables

d)

To delete data

e)

To index data

106.

If multiple dependent tables are linked to a primary table, what type of relationship is this?

a)

One-to-one

b)

Many-to-many

c)

One-to-many

d)

Direct relationship

e)

Irrelevant relationship

107.

What is needed in a many-to-many relationship?

a)

Intermediate table

b)

More primary keys

c)

Combining all data

d)

Encrypting data

e)

Creating a unified table

108.

What does the logical model of a database consist of?

a)

User interface

b)

Tables, fields, and relationships

c)

Server's IP address

d)

Data copying algorithm

e)

SQL queries

109.

What is focused on during physical design?

a)

Data logic

b)

Data storage structure

c)

Data visualization

d)

Data encoding

e)

Data entry

110.

What is the process used to avoid data duplication?

a)

Denormalization

b)

Encryption

c)

Indexing

d)

Recovery

e)

Normalization

111.

What is used to improve performance in a database?

a)

Encryption

b)

Indexes

c)

Control panel

d)

Data backup

e)

Deleting SQL queries

112.

How is the relationship between tables in a database visualized?

a)

Diagram

b)

Code editor

c)

Web server

d)

Command line

e)

Browser

113.

At what step in a database project is the volume of data determined?

a)

Logical design

b)

Physical design

c)

Writing code

114.

At what stage is the volume of data determined in a database project?

a)

Logical design

b)

Physical design

c)

Writing code

d)

Conducting tests

e)

Entering data

115.

Can one attribute have multiple values?

a)

Yes

b)

No

c)

Sometimes

d)

Only in special cases

e)

User decides

116.

What is the result of correctly designing a database model?

a)

The system works slowly

b)

Data is duplicated

c)

The system works quickly and reliably

d)

Data is lost

e)

Incorrect queries arise

117.

At what stage is the role of users determined during database design?

a)

Gathering data requirements

b)

Physical design

c)

Creating tables

d)

Adding indexes

e)

Writing SQL

118.

What is the final stage of a database project?

a)

Creating tables

b)

Writing SQL queries

c)

Testing and optimization

d)

Visualizing data

e)

Installing the server

119.

Why is the relationship between tables necessary?

a)

To duplicate data

b)

To merge data and maintain integrity

c)

To copy data

d)

To encrypt data

e)

To delete data

120.

What type of relationship occurs when one record in one table is linked to only one record in another table?

a)

One-to-many

b)

One-to-one

c)

Many-to-many

d)

Reverse relationship

e)

Open relationship

121.

What is the type of relationship when one record in one table is linked to multiple records?

a)

One-to-many

b)

One-to-one

c)

Many-to-many

d)

Empty relationship

e)

Open relationship

122.

What is required for a many-to-many relationship?

a)

One table

b)

An additional (intermediate) table

c)

Direct relationship

d)

New attribute

e)

Re-indexing

123.

What is a FOREIGN KEY?

a)

The primary key of a table

b)

A field that references the primary key of another table

c)

A field that encrypts data

d)

A mechanism for searching data

e)

A method of protecting data

124.

Can there be multiple foreign keys in one table?

a)

Yes

b)

No

c)

Only one

d)

Only in special cases

e)

Only in internal tables

125.

What type of data integrity is maintained when tables are related?

a)

Physical integrity

b)

Logical integrity

c)

Referential integrity

d)

Table integrity

e)

Programmatic integrity

126.

What does 'ON DELETE CASCADE' mean?

a)

The record is modified

b)

The relationship is broken

c)

If the main record is deleted, related records are also deleted

d)

Only the main record is kept

e)

All records are updated

127.

What does 'ON UPDATE CASCADE' mean?

a)

The database is recreated

b)

The relationship is not broken

c)

If the main record is changed, related records are also changed

d)

All tables are deleted

e)

Records are automatically archived

128.

In a one-to-many relationship, which table holds the foreign key?

a)

Main table

b)

Dependent table

c)

Both tables are the same

d)

Additional table

e)

Three

129.

Which table holds the foreign key in a one-to-many relationship?

a)

Main table

b)

Dependent table

c)

Both tables are the same

d)

Additional table

e)

Third table

130.

What does the intermediate table contain for a many-to-many relationship?

a)

Only one key

b)

Two foreign keys

c)

Only the primary key

d)

All fields of both tables

e)

One foreign key and one primary key

131.

What property does a FOREIGN KEY have?

a)

Uniqueness

b)

Must be encrypted

c)

References the primary key of another table

d)

Restricts data

e)

Copies data

132.

Which relationship is important for ensuring data integrity?

a)

Logical relationship

b)

Physical relationship

c)

Referential relationship

d)

Code relationship

e)

User relationship

133.

Which relationship in a database connects multiple values at once?

a)

One-to-one

b)

One-to-many

c)

Primary relationship

d)

Open relationship

e)

Logical relationship

134.

Where can the foreign key in a one-to-one relationship be located?

a)

Only in the main table

b)

Only in the dependent table

c)

In both tables

d)

In the intermediate table

e)

In a newly created table

135.

How are relationships shown in a database diagram?

a)

With columns

b)

With arrows

c)

With rows

d)

With a list of tables

e)

With numerical indicators

136.

How is the relationship between FOREIGN KEY and PRIMARY KEY established?

a)

Only through table names

b)

Only through data values

c)

A field in one table references the primary key of another table

d)

Through the names of the tables

e)

Through the query code

137.

How are relationships described in an SQL query?

a)

Through CONNECT

b)

Through ADD

c)

Through BIND

d)

Through MERGE

e)

Through FOREIGN KEY and REFERENCES

138.

If one record in a table corresponds to multiple records in another table, what type of relationship is this?

a)

One-to-one

b)

Bidirectional relationship

c)

Many-to-many

d)

One-to-many

e)

Open relationship

139.

What role does the intermediate table play in a many-to-many relationship?

a)

Copies data

b)

Encrypts data

c)

Maintains the relationship between two tables

d)

Indexes data

e)

Codes data

140.

Create a table named 'Students' with fields 'id', 'name', and 'birthdate'. The 'id' field should be the primary key.

a)

CREATE TABLE Students (id INT PRIMARY KEY, name VARCHAR(50), birthdate DATE);

b)

CREATE Students TABLE (id PRIMARY, name STRING, birthdate DATETIME);

c)

CREATE Students (id KEY, name CHAR, birthdate STRING);

d)

MAKE TABLE Students (id NUMBER PRIMARY, name VARCHAR(50), birthdate DATE);

e)

INSERT INTO Students VALUES (id, name, birthdate);

141.

Query the 'Employees' table to get the names and salaries of all employees, but only show those with a salary above 5000.

4 lines
142.

In the 'Employees' table, query the names and salaries of all employees, but only show employees with a salary greater than 5000.

a)

SELECT name, salary FROM Employees WHERE salary > 5000;

b)

SELECT name, salary FROM Employees WHERE salary < 5000;

c)

SELECT * FROM Employees WHERE salary > 5000;

d)

SELECT name FROM Employees WHERE salary >= 5000;

e)

SELECT name, salary FROM Employees WHERE salary = 5000;

143.

In the 'Employees' table, find the average salary in each department.

a)

SELECT department, AVG(salary) AS avg_salary FROM Employees GROUP BY department;

b)

SELECT department, MAX(salary) AS avg_salary FROM Employees GROUP BY department;

c)

SELECT department, MIN(salary) AS avg_salary FROM Employees GROUP BY department;

d)

SELECT department, SUM(salary) AS avg_salary FROM Employees GROUP BY department;

e)

SELECT department, COUNT(salary) AS avg_salary FROM Employees GROUP BY department;

144.

In the 'Employees' table, output the names and salaries of employees with a salary less than 5000.

a)

SELECT name, salary FROM Employees WHERE salary < 5000;

b)

SELECT name, salary FROM Employees WHERE salary <= 5000;

c)

SELECT name, salary FROM Employees WHERE salary > 5000;

d)

SELECT name FROM Employees WHERE salary < 5000;

e)

SELECT name, salary FROM Employees WHERE salary = 5000;

145.

What result do we get by executing the following SQL query? SELECT name, department, salary FROM Employees WHERE salary BETWEEN 4000 AND 6000;

a)

All employees' names, departments, and salaries will be shown.

b)

Employees with a salary between 4000 and 6000 will be shown.

c)

Only employees with a salary of 4000 or 6000 will be shown.

d)

Only data of employees with a salary less than 6000 will be shown.

e)

All employees with a salary greater than 4000 will be shown.

146.

What result do we get from the following SQL query? SELECT department, COUNT(*) AS num_employees FROM Employees GROUP BY department;

a)

The number of employees in each department will be shown.

b)

The details of each employee will be shown.

c)

The total number of employees will be shown.

d)

The name of each department and the salaries of employees will be shown.

e)

The name of each department and the average salary will be shown.

147.

What result will you get when executing the following SQL query? SELECT department, AVG(salary) AS avg_salary FROM Employees GROUP BY department HAVING AVG(salary) > 5000;

a)

The names and average salaries of departments with an average salary greater than 5000 will be shown.

b)

The average salaries of all departments will be shown.

c)

The number of departments will be shown.

d)

The salaries of all employees will be shown.

148.

What result do we get from the following SQL query? UPDATE Employees SET salary = salary * 1.1 WHERE department = 'IT';

a)

"IT" department's salaries of all employees increase by 10%.

b)

"HR" department's salaries of all employees increase by 10%.

c)

All employees' salaries increase by 10%.

d)

"IT" department's salaries of all employees decrease by 10%.

e)

"IT" department's salaries of all employees increase by 5%.

149.

What result do you get when executing the following SQL query? DELETE FROM Employees WHERE salary < 5000;

a)

Deletes all employees with a salary below 5000.

b)

Deletes all employees.

c)

Deletes all employees with a salary above 5000.

d)

Only deletes employees from the "IT" department.

e)

Deletes employees from all departments.

150.

What result do we get from the following SQL query? SELECT DISTINCT department FROM Employees;

a)

Shows the names of all departments.

b)

Shows only the names of unique departments.

c)

Shows all employees' details.

d)

Shows the number of employees in each department.

e)

Shows the highest salary in each department.

151.

What result do we get from the following SQL query? SELECT name, salary FROM Employees WHERE department = 'IT' AND salary > 5000;

a)

Shows all employees in the "IT" department.

b)

Shows employees in the "IT" department with a salary below 5000.

c)

Shows employees in the "IT" department with a salary above 5000.

d)

Shows all employees in the "HR" department.

e)

Shows all employees in the "IT" department and their salaries.

152.

What result do we get from the following SQL query? SELECT name, salary * 1.2 AS updated_salary FROM Employees;

a)

Shows all employees' names and new salaries (salary increased by 20%).

b)

Shows all employees' names and original salaries.

c)

Shows all employees' new salaries, but names are not shown.

d)

Shows all employees' salaries decreased by 20%.

e)

Shows only the names of employees whose salaries were increased by 20%.

153.

What result do we get from the following SQL query? SELECT MAX(salary) AS highest_salary FROM Employees;

a)

Shows the highest salary.

b)

Shows all employees' salaries.

c)

Shows the lowest salary.

Similar Resources on Wayground