Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYSQL #211

Closed
testtree opened this issue Aug 2, 2020 · 0 comments
Closed

MYSQL #211

testtree opened this issue Aug 2, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@testtree
Copy link
Contributor

testtree commented Aug 2, 2020

Please add this questions for MYSQL

#### Q1. When you have a subquery inside of the main query, which query is executed first?
- [ ] The subquery is never executed. Only the main query is executed.
- [ ] They are executed at the same time
- [ ] the main query
- [ ] the subquery

#### Q2. You need to export the entire database, including the database objects, in addition to the data. Which command-line tool do you use?
- [ ] mysqlexport
- [ ] mysqladmin
- [ ] mysqldump
- [ ] mysqld

#### Q3. You must ensure the accuracy and reliability of the data in your database. You assign some constraints to limit the type of data that can go into a table. What type of constraints are you assigning?
- [ ] row level
- [ ] database level
- [ ] column level
- [ ] function leve

#### Q4. Which option of most MySQL command-line programs can be used to get a description of the program's different options?
- [ ] --options
- [ ] ?
- [ ] --help
- [ ] -h

#### Q5. MySQL uses environment variables in some of the programs and command-line operations. Which variable is used by the shell to find MySQL programs?
- [ ] DIR
- [ ] HOМЕ
- [ ] PATH
- [ ] MYSQL_HOME

#### Q6. How can you create a stored procedure in MySQL?
- [ ] `-`

1 CREATE PROCEDURE P () AS
2 BEGIN
3 END;

- [ ] `-`

1 CREATE PROCEDURE P ()
2 BEGIN
3 END

- [ ] `-`

1 CREATE PROCP
2 BEGIN
3 END;

- [ ] `-`

1 CREATE PROC P AS O
2 BEGIN
3 END;


#### Q7. If you were building a table schema to store student grades as a letter (A, B, C, D, or F) which column type would be the best choice?
- [ ] ENUM
- [ ] OTEXT
- [ ] VARCHAR
- [ ] LONGTEXT

#### Q8. Management has requested that you build an employee database. You start with the employee table. What is the correct syntax?
- [ ] `-`
1 CREATE TABLE employee (
2 employee ID char(10), 
3 firstName varchar(50), 
4 lastName varchar(50), 
5 phone varchar(20), 
6 address varchar(50), 
7 PRIMARY KEY ON employeeID 
8 );
- [ ] `-`
1 CREATE TABLE employee (
2 employee ID char(10), 
3 firstName varchar(50), 
4 lastName varchar(50), 
5 phone varchar(20),
6 address varchar(50), 
7 PRIMARY KEY employeeID 
8 );
- [ ] `-`
1 CREATE TABLE IF EXISTS employee ( 
2 employee ID char(10), 
3 firstName varchar(50), 
4 lastName varchar(50), 
5 phone varchar(20), 
6 address varchar(50), 
7 PRIMARY KEY (employeeID) 
8 );
- [ ] `-`
1 CREATE TABLE IF NOT EXISTS employee (
2 employee ID char(10), 
3 firstName varchar(50), 
4 lastName varchar(50), 
5 phone varchar(20), 
6 address varchar(50), 
7 PRIMARY KEY (employeeID) 
8 );

#### Q9. You are working with the tables as shown in this diagram. You need to generate the list of customers who purchased certain car models. Which SQL clause do you use?
- [ ] LIKE
- [x] IN
- [ ] BETWEEN
- [ ] HAVING

#### Q10. Which query would NOT be used to administer a MySQL server?
- [ ]  USE db
- [ ] SELECT column FROM tbl
- [ ] SHOW COLUMNS FROM tb1
- [ ] SHOW TABLES

#### Q11. What is the product of the database designing phase?
- [ ] system definition
- [ ] logical model
- [ ] physical model
- [ ] normalized database

#### Q12. MySQL server can operate in different SQL modes, depending on the value of the sql_mode system variable. Which mode changes syntax and behavior to conform more closely to standard SQL?
- [ ] TRADITIONAL
- [ ] ANSI
- [ ] MSSQL
- [ ] STRICT

#### Q13. MySQL programs are a set of command-line utilities that are provided with typical MySQL distributions. MySQL is designed to be a database.
- [ ] database and programming
- [ ] user and administrator
- [ ] client and server
- [ ] syntax and objects

#### Q14. Which MySQL command shows the structure of a table?
- [ ] INFO table;
- [ ] SHOW table;
- [ ]  STRUCTURE table;
- [ ]  DESCRIBE table;

#### Q15. MySQL uses security based on_____for all connections, queries, and other operations that users can attempt to perform.
- [ ]  administrator schema
- [ ] encrypted algorithms
- [ ] user settings
- [ ] access control lists

#### Q16. Which MySQL command modifies data records in a table?
- [ ] UPDATE
- [ ] MODIFY
- [ ] CHANGE
- [ ] ALTER

#### Q17. What is the best type of query for validating the format of an email address in a MySQL table?
- [ ] a SQL query using partitions
- [ ] a SQL query using IS NULL
- [ ] a SQL query using a regular expression
- [ ] a SQL query using LTRIM Or RTRIM

#### Q18. In MySQL, queries are always followed by what character?
- [ ] line break
- [ ] colon
- [ ] semicolon
- [ ] period

#### Q19. How can you remove a record using MySQL?
- [ ] DELETE
- [ ] DELETE FROM
- [ ] REMOVE
- [ ] REMOVE FROM

#### Q20. Which choice is NOT a statement you would use to filter data?
- [ ] GROUP_BY
- [ ] WHERE
- [ ] LIMIT
- [ ] LIKE

#### Q21. What does the following SQL statement return?
  `SELECT * FROM Employees WHERE EmployeeName LIKE 'a%'`
- [ ] It records in the Employees table where the value in the EmployeeName column doesn't have an "a".
- [ ] It records in the Employees table where the value in the EmployeeName column starts with "a".
- [ ] It records in the Employees table where the value in the EmployeeName column has an "a".
- [ ] It records in the Employees table where the value in the EmployeeName column ends with "a".

#### Q22. In `SELECT * FROM clients;` what does clients represent?
- [ ] a SQL query
- [ ] a SQL statement
- [ ] a database
- [ ] a table

#### Q23. How does MySQL differ from SQL?
- [ ] SQL is a standard language for retrieving and manipulating data from structured databases. MySQL is a nonrelational database management system that is used to manage SQL databases.
- [ ] SQL is a standard language for retrieving and manipulating data from structured databases. MySQL is a relational database management system that is used to manage SQL databases.
- [ ] They are not different. MySQL and SQL refer to the same thing.
- [ ] My SQL is a language, and SQL is a software application.

#### Q24. If you need to order a table of movies by name, which query will work?
- [ ] SELECT * FROM movies GROUP BY name
- [ ] SELECT * FROM movies ORDER BY name
- [ ] SELECT * FROM movies ORDER TABLE by name
- [ ] SELECT * FROM movies FILTER BY name

#### Q25. A trigger is a database object that is associated with a table, and that activates when a particular event occurs for the table. Which three events are these?
- [ ] INSERT, UPDATE, DELETE
- [ ] CREATE, ALTER, DROP
- [ ] OPEN, FETCH, CLOSE
- [ ] DECLARE, SET, SELECT

#### Q26. You are working with very large tables in your database. Which SQL clause do you use to prevent exceedingly large query results?
- [ ] UNIQUE
- [ ] LIMIT
- [ ] DISTINCT
- [ ] CONSTRAINT

#### Q27. What is the default port for MySQL Server?
- [ ] 25
- [ ] 990
- [ ] 0
- [ ] 3306

#### Q28. How can you filter duplicate data while retrieving records from a table?
- [ ] DISTINCT
- [ ] WHERE
- [ ] LIMIT
- [ ] AS

#### Q29. What is the difference between DROP and TRUNCATE?
- [ ] They both refer to the same operation of deleting the table completely.
- [ ] They both refer to the same operation of clearing the table, but keeping its definition intact.
- [ ] TRUNCATE deletes table completely, removing its definition as well. DROP clears the table but does not delete the definition.
- [ ] DROP deletes table completely, removing its definition as well. TRUNCATE clears the table but does not delete the definition.

#### Q30. How do you select every row in a given table named "inventory"?
- [ ] SELECT all FROM inventory;
- [ ] FROM inventory SELECT all;
- [ ] FROM inventory SELECT *;
- [ ] SELECT * FROM inventory;

#### Q31. In an efficiently designed relational database, what does every table have?
- [ ] set of triggers
- [ ] sequential id field
- [ ] minimum of three columns
- [ ] primary key

#### Q32. MySQL option files provide a way to specify commonly used options so that they need not be entered on the command line each time you run a program. What is another name for the option files?
- [ ] variable settings
- [ ] configuration files
- [ ] help files
- [ ] default settings

#### Q33. After installing MySQL, it may be necessary to initialize the __ which may be done automatically with some MySQL installation methods.
- [ ] storage engine
- [ ] user accounts
- [ ] grant tables
- [ ] data directory
@Ebazhanov Ebazhanov added the good first issue Good for newcomers label Aug 2, 2020
@testtree testtree closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants