WorksheetsICTPRG431Session 2 Introduction Database Management Systems Quiz
Total questions: 22
Worksheet time: 11mins
What does SQL stand for in database management systems?
Structured Query Language
Simple Query Language
Sequential Query Language
Standard Query Language
Which language is used for defining and manipulating data in a relational database?
Java
Python
SQL
C++
What is the purpose of DDL in SQL?
To manipulate data
To define data structures
To enhance performance
To create backups
What is the primary purpose of using SELECT, INSERT, UPDATE, and DELETE commands in SQL?
To modify the SQL software
To control user access and permissions
To manage data in a database
To configure network settings
Which SQL command is used to modify existing data within a table?
SELECT
INSERT
UPDATE
DELETE
What is the primary purpose of key constraints in relational databases?
To link tables together
To ensure only valid data is entered into tables
To increase processing speed
To duplicate data for backup purposes
What is the purpose of a primary key in a database?
To link two tables together
To uniquely identify a row in a table
To set default values for a column
To enforce data validation rules
Which of the following is true about a foreign key?
It cannot reference a primary key in another table
It must have a different data type than the primary key it references
It ensures referential integrity by linking to a primary key in another table
It must always be a unique value
What does a NULL constraint in SQL specify?
The column must always have a numeric value
The column cannot have duplicate values
The column must not have any value
The column can have empty values
What is the purpose of a unique constraint in SQL?
To ensure all rows in a table can have identical values.
To prevent duplicate entries in a column that is not a primary key.
To link two tables together.
To automatically update data in a table.
How does a check constraint function in SQL?
It ensures that all SQL commands are checked for errors before execution.
It restricts the type of data that can be inserted into a table based on specific conditions.
It checks and removes incorrect entries from a table automatically.
It verifies user permissions before allowing data insertion.
Why are naming conventions not standardized across different companies?
Because all companies use the same software systems
Because different companies in the same field have different naming conventions
Because naming conventions are legally protected
Because naming conventions are irrelevant in modern databases
What should companies do regarding naming conventions according to the image?
Ignore naming conventions as they are outdated
Choose naming conventions randomly
Identify and follow a naming convention
Create a new naming convention for each project
What is the recommended practice for naming tables in a database?
Tables should be named in plural form
Tables should be named in singular form
Tables should include numerals
Tables should use multiple words without linking
What should foreign key constraints in databases include according to the image?
A simple name related to the table
A composite name identifying tables and functionality
Only the primary key of the parent table
Numerals to distinguish different foreign keys
What is the purpose of the "Varchar" data type in MariaDB?
To store fixed-length strings.
To store variable-length strings up to a specified number of characters.
To store integers only.
To store boolean values.
What does DML stand for in SQL and what is its primary function?
Data Manipulation Language, used to retrieve and manipulate database data
Data Modification Language, used to define database structures
Data Management Language, used to control access to data
Data Mapping Language, used to map data structures
Which SQL command is part of DDL?
SELECT
UPDATE
CREATE TABLE
GRANT
Which of the following is not a function of DML?
INSERT
ALTER TABLE
DELETE
UPDATE
What is the primary function of the 'SQL' tab in phpMyAdmin as described in the image?
To import data from SQL files
To manipulate records in database tables using SQL queries
To modify the phpMyAdmin user interface
To export data to CSV files
What SQL command is used to insert new data into a database?
DELETE
UPDATE
SELECT
INSERT INTO
Which of the following correctly represents the basic syntax structure of the INSERT INTO command?
INSERT INTO [table_name] VALUES ([value1], [value2]...)
UPDATE [table_name] SET [column1]=[value1], [column2]=[value2]...
DELETE FROM [table_name] WHERE [condition]
INSERT INTO [table_name] ([column1], [column2]...) VALUES ([value1], [value2]...)
