Font size
WorksheetsДеректер қоры туралы тест
Total questions: 153
Worksheet time: 1hrs 22mins
What is a database (DB)?
Data storage device
A system that stores data in a structured way
A collection of only text files
A random storage place for data
Only an online information base
What is the purpose of a database management system (DBMS)?
To play games online
To protect data
To store, modify, and manage data
To speed up the computer
To compress files
Give an example of a DBMS:
Windows
Oracle
Photoshop
CorelDraw
Linux
What is a relational database?
A DB based on relationships between tables
A graphical database
A system of text files
A base of programming codes
A base of websites
What is an attribute?
A row in a table
A column in a table
A collection of tables
The server of a database
A DBMS application
What is a record?
All values of one column
A set of all attribute values in one row
The name of a table
The type of a database
A query of a database
What element describes a column in a table?
Attribute
Record
Key
Value
Normal form
What is a group of objects defined by the same attribute values called?
Record
Attributes
Key
Index
Transaction
The main structural element of a database:
Column
Row
Table
Relation
Attribute
Which element defines the logical structure of a database?
Database server
Query
ER diagram
Memory size
File size
What is a 'Primary key'?
The main attribute of a table
A unique identifier that does not repeat in a table
The name of a table
Type of query
Type of data
What is used to prevent duplicate values in a table?
Attribute
Index
Unique key
Query
Locking
A key that references another table in the same table:
Primary key
Foreign key
Super key
Candidate key
Composite key
The main functions of a DBMS:
Creating a website
Storing, searching, updating, deleting data
Printing documents
Drawing diagrams
Editing videos
What is SQL?
Programming language
Database query language
Network architecture
Graphical interface
Driver package
What is an ER model?
Electronic relational model
A model describing objects and their relationships
The physical structure of a database
Programming code
Website template
What does a rectangle represent in an ER diagram?
Relationship
Attribute
Query
Entity
Index
What does a diamond represent in an ER diagram?
Attribute
Relationship
Entity
Key
What does the diamond represent in an ER diagram?
Attribute
Relationship
Entity
Key
Column
What does the ellipse represent in an ER diagram?
Attribute
Entity
Relationship
Table
Request
What type of relationship occurs when a record in one table corresponds to multiple records in another table?
1:1
1:M
M:1
M:N
0:M
How is a 'Many-to-Many' relationship described?
One record points to only one record
Multiple records relate to multiple records
One record does not relate anywhere
One record is divided into multiple attributes
One key is divided into multiple columns
What does Entity mean in an ER model?
Database server
Real or abstract object
Relationship between tables
Data type
SQL query
What does each Entity describe?
Keys
Attributes
Tables
Indexes
Functions
What does a Primary Key define?
Set of unique attributes
Multiple relationships
Foreign key
Normalization level
Number of records
What is a Weak entity?
An object that cannot create a key independently
An object that combines all attributes
Multiple relationships
A physical server
A table without normal form
How does a Weak entity relate?
Through Primary key
Through Foreign key
Through attribute
Through SQL query
Through index
What is the purpose of a 'linking table' in a many-to-many relationship?
To copy data
To link two tables
To store data
To encrypt data
To index
What is a relationship attribute?
An attribute specific to one table
An attribute that describes the relationship
A unique attribute
A key attribute
An external attribute
What does 'Participation' mean in an ER model?
Choosing attributes
Degree of participation of objects in the relationship
Merging records
Storing data
Defining keys
If one Entity is independent of another Entity, what type of Entity is it?
Weak entity
Strong entity
Composite entity
Derived entity
External entity
How is a key attribute marked in an ER diagram?
Colored black
Underlined
Dotted line
Surrounded by a border
Marked with a star
What is a 'Derived attribute'?
Main attribute
Attribute derived from other values
Unique key attribute
Record identifier
Attribute that is only stored
What is the purpose of using an ER model?
To visually represent the structure of a database
For programming
To design a computer network
To create a website
What is the purpose of the ER model?
To visually represent the structure of data
For programming
To design computer networks
To create websites
To open text files
Name the types of participation in multiple relationships.
Mandatory and optional
Primary and secondary
Main and additional
Individual and shared
First and second
How many entities can one relationship contain?
Only 1
Only 2
Two or more
Only 3
Only 4
What is a key?
A method of encoding data
An attribute or set of attributes that uniquely identifies records in a table
An algorithm for encrypting data
The name of the database
A type of DBMS
A key consisting of a set of unique values:
Primary key
Foreign key
Composite key
Candidate key
Alternate key
Composite key
A key consisting of only one attribute
A key consisting of a combination of multiple attributes
Foreign key
Index key
Column key
Candidate key
Only one attribute
All possible keys with uniqueness property in the table
A method of grouping data
Related attributes
A type of unique index
How many candidate keys can a table have if it can only have one primary key?
Only one
None
One or more
Only two
Only three
What function does a foreign key serve?
Encrypts data
Links one table to another
Copies tables
Sorts data
Sets an index
What is a super key?
A key that shows the names of all tables
A set of attributes that ensures unique identification
A list of foreign keys
A method of indexing
A type of function
Which type of attribute cannot be a key?
Unique attribute
Numeric attribute
Constant attribute
Foreign attribute
Attribute that can accept null values
The main property of a unique key in a table
Can be repeated multiple times
Can accept null values
Does not repeat for each record
Is only for numeric values
Always relates to a foreign key
What types of attributes are there?
Numeric and textual
Primary and secondary
Simple and complex
Internal and external
Initial and final
What is a composite attribute?
An attribute that can accept multiple values
A numeric attribute
An attribute unrelated to a unique key
An attribute consisting of multiple simple attributes
An external attribute
What type of attribute can accept multiple values at once?
Simple attribute
External attribute
Unique attribute
Key attribute
Multivalued attribute
Derived attribute
What type of attribute can accept multiple values?
Simple attribute
External attribute
Unique attribute
Key attribute
Multivalued attribute
Example of a derived attribute?
User's name
Country code
City name
Age calculated from birth date
Identifier number
What attributes should a primary key consist of?
Must accept NULL values
Complex and encrypted
Complex and external
Foreign attributes
Unique and must not accept NULL values
If uniqueness is ensured only when combining two or more attributes, what type of key is it?
Primary key
Foreign key
Composite key
Alternate key
Derived key
What is normalization?
Data encryption method
Data storage device
Process of optimizing data structure
Data visualization
Data encoding
What is the main goal of normalization?
Freeing up memory
Creating indexes
Increasing speed
Reducing data redundancy and ensuring integrity
Reducing network traffic
How many levels does normalization consist of?
1
2
3 and above
5
6
What is the condition for the first normal form (1NF)?
Attributes can be repeated
Multiple values must be stored
Attributes must be grouped
Attributes must be fragmented
Attributes must be atomic
If there are duplicate data in a table, which normalization rule does it violate?
1NF
2NF
3NF
BCNF
4NF
What needs to be done to achieve the second normal form (2NF)?
Split the table in two
All attributes must be fully dependent on the primary key
Combine all attributes
Set indexes on all attributes
Copy the data
What issues does the second normal form address?
Duplicate records
Data encryption
Data encoding
Data visualization
Network connection
What is the condition for the third normal form (3NF)?
Attributes must be mutually dependent
Attributes must only depend on the primary key
Attributes must be repeated
Attributes must be separated
Data must not be stored
What is transitive dependency?
Independence of one attribute from another
Dependency of one attribute on another through a key
Sum of attributes
Merging data
Indexing data
What does 3NF normalization prevent?
Data encoding
Data indexing
Transitive dependency of data
Data duplication
Data loss
What issue does BCNF (Boyce-Codd Normal Form) focus on?
(a)
What issue does NF (Boyce-Codd Normal Form) focus on?
Reducing the number of attributes
Saving memory
Ensuring all dependencies are based on keys
Encrypting data
Strengthening network connections
What is the difference between BCNF and 3NF?
BCNF requires all determinants to be keys
BCNF resolves transitive dependencies
3NF only identifies keys
3NF removes all relationships
Both are the same
If a table is in 3NF, which normalization rules does it follow?
Only 1NF
None
Only 2NF
Only BCNF
1NF and 2NF
What should not be present in the first normal form?
Multiple values should not be stored in one cell
Indexes should not be present
Data should be repeated
Data should not be encrypted
Data should be combined
What issue does 4NF aim to solve?
Transitive dependency
Multivalued dependency
Combining attributes
Optimizing indexes
Quick data delivery
What situation arises when there is a multivalued dependency?
One attribute depends on several other attributes
All attributes depend on the primary key
Attributes are fully separated
Attributes are encrypted
Data is deleted
What normalization problem does 5NF solve?
Data duplication
Data being stored separately
Indexing data
Encoding data
Protecting data
What is denormalization?
Completion of normalization
Data encryption
Data merging
Improving performance by lowering normalization level
Data visualization
When is denormalization used?
To enhance data security
To ensure quick data access
To complicate the system
To encode data
To reduce attributes
What is the first step of normalization?
Indexing data
Data visualization
Data copying
Making data atomic
Grouping data
What is SQL?
A language for working with databases
A programming language
A data protection system
A data visualization tool
A data encryption algorithm
What is the full name of SQL?
Structured Question Language
Simple Query Language
Structured Query Language
Server Query Language
Standard Query Logic
Which SQL command is used to select data?
UPDATE
DELETE
SELECT
INSERT
CREATE
Which SQL command is used to select data?
UPDATE
DELETE
SELECT
INSERT
CREATE
Which keyword is used to sort data in a SELECT query?
ORDER BY
GROUP BY
HAVING
WHERE
FROM
What word is added to reverse the order of sorting?
ASC
DESC
FIRST
LAST
INVERSE
Which SQL command is used to update data?
INSERT
ALTER
SELECT
DELETE
UPDATE
Which command is used to delete data?
SELECT
UPDATE
DELETE
DROP
REMOVE
Which command is used to add new data in SQL?
INSERT INTO
UPDATE
SELECT
DROP
CREATE
Which keyword is used to set conditions in SQL?
ORDER
GROUP
HAVING
WHERE
SET
Which command is used to create a table in SQL?
CREATE TABLE
MAKE TABLE
NEW TABLE
ADD TABLE
SET TABLE
Which command is used to drop a table in SQL?
REMOVE
CLEAR TABLE
DELETE TABLE
ERASE TABLE
DROP TABLE
Which operators are used to combine multiple conditions in SQL?
AND and OR
IF and ELSE
TRUE and FALSE
WHILE and FOR
CASE and WHEN
Which operator is used to make a query within a specific range of data in SQL?
LIKE
ALL
IN
ANY
BETWEEN
Which operator is used for pattern matching in SQL?
FIND
SEARCH
LIKE
SCAN
FILTER
Which operator is used to group results?
ORDER BY
UNION
HAVING
JOIN
GROUP BY
What operation is used to combine two or more tables in SQL?
MERGE
ATTACH
COMBINE
GATHER
UNION
What does INNER JOIN mean?
Combine all records
Combine records with common values
Copy all data
Transform one table into another
Delete data
What data is returned as a result of a LEFT JOIN?
Only data from the left table
Only data from the right table
Only matching data
No data is returned
All tables
Which operator limits the number of records in SQL?
LIMIT
TOP
FIRST
OFFSET
MIN
Which operator is used to set conditions on grouped data in SQL?
WHERE
GROUP BY
ORDER BY
HAVING
LIMIT
The first step in database design:
Creating tables
Analyzing data requirements
Adding indexes
Writing SQL queries
Migrating data
What is determined first during database design?
User interface
SQL syntax
Server IP address
Network security
Data structure
What is determined first when designing a database?
User interface
SQL syntax
Server IP address
Network security
Structure of data
At which stage is it determined how to store data?
Writing code
Visualizing data
Indexing data
Physical design
Encrypting data
At what step are relationships between data defined?
Logical design
Physical design
Writing SQL queries
Creating modules
Conducting tests
What is the purpose of an ER diagram (Entity-Relationship Diagram)?
To launch the program
To show relationships between data
To encrypt data
To index data
To store data
What is an attribute?
Name of the database
Type of data encryption
User identifier
Method of data copying
Description of an object
What is a primary key?
Field that uniquely identifies a record in a table
Data encryption tool
Data search tool
Data sorting method
Data encoding method
What is a foreign key used for?
To encrypt data
To sort data
To show relationships between tables
To delete data
To index data
If multiple dependent tables are linked to a primary table, what type of relationship is this?
One-to-one
Many-to-many
One-to-many
Direct relationship
Irrelevant relationship
What is needed in a many-to-many relationship?
Intermediate table
More primary keys
Combining all data
Encrypting data
Creating a unified table
What does the logical model of a database consist of?
User interface
Tables, fields, and relationships
Server's IP address
Data copying algorithm
SQL queries
What is focused on during physical design?
Data logic
Data storage structure
Data visualization
Data encoding
Data entry
What is the process used to avoid data duplication?
Denormalization
Encryption
Indexing
Recovery
Normalization
What is used to improve performance in a database?
Encryption
Indexes
Control panel
Data backup
Deleting SQL queries
How is the relationship between tables in a database visualized?
Diagram
Code editor
Web server
Command line
Browser
At what step in a database project is the volume of data determined?
Logical design
Physical design
Writing code
At what stage is the volume of data determined in a database project?
Logical design
Physical design
Writing code
Conducting tests
Entering data
Can one attribute have multiple values?
Yes
No
Sometimes
Only in special cases
User decides
What is the result of correctly designing a database model?
The system works slowly
Data is duplicated
The system works quickly and reliably
Data is lost
Incorrect queries arise
At what stage is the role of users determined during database design?
Gathering data requirements
Physical design
Creating tables
Adding indexes
Writing SQL
What is the final stage of a database project?
Creating tables
Writing SQL queries
Testing and optimization
Visualizing data
Installing the server
Why is the relationship between tables necessary?
To duplicate data
To merge data and maintain integrity
To copy data
To encrypt data
To delete data
What type of relationship occurs when one record in one table is linked to only one record in another table?
One-to-many
One-to-one
Many-to-many
Reverse relationship
Open relationship
What is the type of relationship when one record in one table is linked to multiple records?
One-to-many
One-to-one
Many-to-many
Empty relationship
Open relationship
What is required for a many-to-many relationship?
One table
An additional (intermediate) table
Direct relationship
New attribute
Re-indexing
What is a FOREIGN KEY?
The primary key of a table
A field that references the primary key of another table
A field that encrypts data
A mechanism for searching data
A method of protecting data
Can there be multiple foreign keys in one table?
Yes
No
Only one
Only in special cases
Only in internal tables
What type of data integrity is maintained when tables are related?
Physical integrity
Logical integrity
Referential integrity
Table integrity
Programmatic integrity
What does 'ON DELETE CASCADE' mean?
The record is modified
The relationship is broken
If the main record is deleted, related records are also deleted
Only the main record is kept
All records are updated
What does 'ON UPDATE CASCADE' mean?
The database is recreated
The relationship is not broken
If the main record is changed, related records are also changed
All tables are deleted
Records are automatically archived
In a one-to-many relationship, which table holds the foreign key?
Main table
Dependent table
Both tables are the same
Additional table
Three
Which table holds the foreign key in a one-to-many relationship?
Main table
Dependent table
Both tables are the same
Additional table
Third table
What does the intermediate table contain for a many-to-many relationship?
Only one key
Two foreign keys
Only the primary key
All fields of both tables
One foreign key and one primary key
What property does a FOREIGN KEY have?
Uniqueness
Must be encrypted
References the primary key of another table
Restricts data
Copies data
Which relationship is important for ensuring data integrity?
Logical relationship
Physical relationship
Referential relationship
Code relationship
User relationship
Which relationship in a database connects multiple values at once?
One-to-one
One-to-many
Primary relationship
Open relationship
Logical relationship
Where can the foreign key in a one-to-one relationship be located?
Only in the main table
Only in the dependent table
In both tables
In the intermediate table
In a newly created table
How are relationships shown in a database diagram?
With columns
With arrows
With rows
With a list of tables
With numerical indicators
How is the relationship between FOREIGN KEY and PRIMARY KEY established?
Only through table names
Only through data values
A field in one table references the primary key of another table
Through the names of the tables
Through the query code
How are relationships described in an SQL query?
Through CONNECT
Through ADD
Through BIND
Through MERGE
Through FOREIGN KEY and REFERENCES
If one record in a table corresponds to multiple records in another table, what type of relationship is this?
One-to-one
Bidirectional relationship
Many-to-many
One-to-many
Open relationship
What role does the intermediate table play in a many-to-many relationship?
Copies data
Encrypts data
Maintains the relationship between two tables
Indexes data
Codes data
Create a table named 'Students' with fields 'id', 'name', and 'birthdate'. The 'id' field should be the primary key.
CREATE TABLE Students (id INT PRIMARY KEY, name VARCHAR(50), birthdate DATE);
CREATE Students TABLE (id PRIMARY, name STRING, birthdate DATETIME);
CREATE Students (id KEY, name CHAR, birthdate STRING);
MAKE TABLE Students (id NUMBER PRIMARY, name VARCHAR(50), birthdate DATE);
INSERT INTO Students VALUES (id, name, birthdate);
Query the 'Employees' table to get the names and salaries of all employees, but only show those with a salary above 5000.
In the 'Employees' table, query the names and salaries of all employees, but only show employees with a salary greater than 5000.
SELECT name, salary FROM Employees WHERE salary > 5000;
SELECT name, salary FROM Employees WHERE salary < 5000;
SELECT * FROM Employees WHERE salary > 5000;
SELECT name FROM Employees WHERE salary >= 5000;
SELECT name, salary FROM Employees WHERE salary = 5000;
In the 'Employees' table, find the average salary in each department.
SELECT department, AVG(salary) AS avg_salary FROM Employees GROUP BY department;
SELECT department, MAX(salary) AS avg_salary FROM Employees GROUP BY department;
SELECT department, MIN(salary) AS avg_salary FROM Employees GROUP BY department;
SELECT department, SUM(salary) AS avg_salary FROM Employees GROUP BY department;
SELECT department, COUNT(salary) AS avg_salary FROM Employees GROUP BY department;
In the 'Employees' table, output the names and salaries of employees with a salary less than 5000.
SELECT name, salary FROM Employees WHERE salary < 5000;
SELECT name, salary FROM Employees WHERE salary <= 5000;
SELECT name, salary FROM Employees WHERE salary > 5000;
SELECT name FROM Employees WHERE salary < 5000;
SELECT name, salary FROM Employees WHERE salary = 5000;
What result do we get by executing the following SQL query? SELECT name, department, salary FROM Employees WHERE salary BETWEEN 4000 AND 6000;
All employees' names, departments, and salaries will be shown.
Employees with a salary between 4000 and 6000 will be shown.
Only employees with a salary of 4000 or 6000 will be shown.
Only data of employees with a salary less than 6000 will be shown.
All employees with a salary greater than 4000 will be shown.
What result do we get from the following SQL query? SELECT department, COUNT(*) AS num_employees FROM Employees GROUP BY department;
The number of employees in each department will be shown.
The details of each employee will be shown.
The total number of employees will be shown.
The name of each department and the salaries of employees will be shown.
The name of each department and the average salary will be shown.
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;
The names and average salaries of departments with an average salary greater than 5000 will be shown.
The average salaries of all departments will be shown.
The number of departments will be shown.
The salaries of all employees will be shown.
What result do we get from the following SQL query? UPDATE Employees SET salary = salary * 1.1 WHERE department = 'IT';
"IT" department's salaries of all employees increase by 10%.
"HR" department's salaries of all employees increase by 10%.
All employees' salaries increase by 10%.
"IT" department's salaries of all employees decrease by 10%.
"IT" department's salaries of all employees increase by 5%.
What result do you get when executing the following SQL query? DELETE FROM Employees WHERE salary < 5000;
Deletes all employees with a salary below 5000.
Deletes all employees.
Deletes all employees with a salary above 5000.
Only deletes employees from the "IT" department.
Deletes employees from all departments.
What result do we get from the following SQL query? SELECT DISTINCT department FROM Employees;
Shows the names of all departments.
Shows only the names of unique departments.
Shows all employees' details.
Shows the number of employees in each department.
Shows the highest salary in each department.
What result do we get from the following SQL query? SELECT name, salary FROM Employees WHERE department = 'IT' AND salary > 5000;
Shows all employees in the "IT" department.
Shows employees in the "IT" department with a salary below 5000.
Shows employees in the "IT" department with a salary above 5000.
Shows all employees in the "HR" department.
Shows all employees in the "IT" department and their salaries.
What result do we get from the following SQL query? SELECT name, salary * 1.2 AS updated_salary FROM Employees;
Shows all employees' names and new salaries (salary increased by 20%).
Shows all employees' names and original salaries.
Shows all employees' new salaries, but names are not shown.
Shows all employees' salaries decreased by 20%.
Shows only the names of employees whose salaries were increased by 20%.
What result do we get from the following SQL query? SELECT MAX(salary) AS highest_salary FROM Employees;
Shows the highest salary.
Shows all employees' salaries.
Shows the lowest salary.
