Study guide questions Flashcards

1
Q

MySQL indexes are for what purpose (pick 2):
- There are some internally created schemas.
- Optimize queries and data manipulation operations
- Store data in a sorted order

A
  • Optimize queries and data manipulation operations
  • Store data in a sorted order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why MySQL will use index (pick 3):
- If the column specified in the WHERE clause is indexed, MySQL can use the index to quickly locate the rows that match the condition.
- If the index does not significantly reduce the number of rows scanned, MySQL will use it an index.
- Indexes can be used to efficiently sort or group results, as specified in ORDER BY and GROUP BY clauses.
- Indexes on the columns used in join conditions can speed up the process of matching rows from different tables.

A
  • If the column specified in the WHERE clause is indexed, MySQL can use the index to quickly locate the rows that match the condition.
  • Indexes can be used to efficiently sort or group results, as specified in ORDER BY and GROUP BY clauses.
  • Indexes on the columns used in join conditions can speed up the process of matching rows from different tables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why MySQL will NOT use index (pick 2):
- For small tables, the overhead of using an index might outweigh the benefits
- If used in join statements
- If the index column is not listed first in the select statement
- If the index does not significantly reduce the number of rows scanned (i.e., low selectivity), MySQL might opt not to use it.

A
  • For small tables, the overhead of using an index might outweigh the benefits
  • If the index does not significantly reduce the number of rows scanned (i.e., low selectivity), MySQL might opt not to use it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why MySQL will NOT use index (pick 2):
- Using functions or calculations on the indexed column (e.g., WHERE UPPER(column) = ‘value’) can prevent MySQL from using the index.
- Hint Overrides: Index usage can be overridden by query hints. For example, using IGNORE INDEX in the query can prevent MySQL from using a specific index.
- If the index does significantly reduce the number of rows scanned (i.e., low selectivity), MySQL might opt not to use it.
- If the select statement is perfect

A
  • Using functions or calculations on the indexed column (e.g., WHERE UPPER(column) = ‘value’) can prevent MySQL from using the index.
  • Hint Overrides: Index usage can be overridden by query hints. For example, using IGNORE INDEX in the query can prevent MySQL from using a specific index.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Join that returns all records from left table and matched records from right table
- Left Join (Outer Join)
- Right Join (Outer Join)
- Join (Inner Join)
- Full Join

A

Left Join (Outer Join)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which rows will this statement return:

SELECT * FROM emp LEFT JOIN orders ON emp.id=orders.emp_id;

  • All orders that do not have an employee:
  • All employees and their registered orders:
  • All orders and employees who have registered them:
  • Employees who have not registered any orders:
A

All employees and their registered orders:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which rows will this statement return:

SELECT * FROM emp LEFT JOIN orders ON emp.id=orders.emp_id WHERE orders.emp_id IS NULL

  • All orders that do not have an employee:
  • All employees and their registered orders:
  • All orders and employees who have registered them:
  • Employees who have not registered any orders:
A

Employees who have not registered any orders:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which rows will this statement return:

SELECT * FROM emp RIGHT JOIN orders ON emp.id=orders.emp_id;

  • All orders that do not have an employee:
  • All employees and their registered orders:
  • All orders and employees who have registered them:
  • Employees who have not registered any orders:
A

All orders and employees who have registered them:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which rows will this statement return:

SELECT * FROM emp RIGHT JOIN orders ON emp.id=orders.emp_id WHERE emp.id IS NULL

  • All orders that do not have an employee:
  • All employees and their registered orders:
  • All orders and employees who have registered them:
  • Employees who have not registered any orders:
A

All orders that do not have an employee:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is true about the EXPLAIN statement (pick 2):
- MySQL statement keyword used to see information about joined tables order
- Returns all records from the left table and the matched records from the right table
- Returns all records from the right table and the matched records from the left table
- Includes information about how tables are joined and in which order.

A
  • MySQL statement keyword used to see information about joined tables order
  • Includes information about how tables are joined and in which order.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is true about the EXPLAIN statement (pick 2):
- Works with SELECT, DELETE, INSERT, REPLACE, and UPDATE statements.
- Returns all records from the left table and the matched records from the right table
- Returns all records from the right table and the matched records from the left table
- EXPLAIN shows how MySQL will process a statement

A

Works with SELECT, DELETE, INSERT, REPLACE, and UPDATE statements.

EXPLAIN shows how MySQL will process a statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Statement used to assign privileges to a MySQL user

A

GRANT ALL PRIVILEGES ON . TO ‘test’@’%’ WITH GRANT OPTION;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Statement used to start MySQL server without using privilege system

A

mysqld –skip-grant-tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Privilege category for SYSTEM_USER and FIREWALL_ADMIN
- Dynamic Privileges
- User Privileges
- System Privileges
- Plugin Privileges

A

Dynamic Privileges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

MySQL user account elements (pick 2)
- privileges
- username@host ” identifier
- password
- hostname

A
  • username@host ” identifier
  • password
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Statement to assign password to MySQL user account (pick 2):

CREATE USER ‘ jeffrey ‘@’localhost’ IDENTIFIED BY ‘password_value1’;

SET PASSWORD = ‘ mypass’;

Alter ‘password’ from ‘ jeffrey ‘@’localhost’ = ‘new_password’:

A

CREATE USER ‘ jeffrey ‘@’localhost’ IDENTIFIED BY ‘password_value1’;

SET PASSWORD = ‘ mypass’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Statement to assign password to MySQL user account (pick 2):

Alter ‘password’ from ‘ jeffrey ‘@’localhost’ = ‘new_password’:

SET PASSWORD FOR jeffrey’@’localhost’ = ‘password_value2’;

CREATE fred@localhost IDENTIFIED WITH mysql_native_password BY ‘HisPa55w0rd!’;

A

SET PASSWORD FOR jeffrey’@’localhost’ = ‘password_value2’;

CREATE fred@localhost IDENTIFIED WITH mysql_native_password BY ‘HisPa55w0rd!’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Statement to create one or more roles in MySQL

A

CREATE ROLE ‘role1’, ‘role2’, ‘role3’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

MySQL Enterprise Authentication characteristics (pick 3)

  • Integrates with Centralized Authentication Infrastructure
  • Pluggable Authentication Modules (PAM)
  • FIDO interface (passwordless authentication)
  • Open source Authentication
A
  • Integrates with Centralized Authentication Infrastructure
  • Pluggable Authentication Modules (PAM)
  • FIDO interface (passwordless authentication)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

MySQL Enterprise Authentication characteristics (pick 3)

  • Linux PAM Standard interface (Unix, LDAP, Kerberos, others)
  • Plugin is available to access native LDAP service for authentication.
  • Plugin is available to access native Windows service.
  • Open source Authentication
A
  • Linux PAM Standard interface (Unix, LDAP, Kerberos, others)
  • Plugin is available to access native LDAP service for authentication.
  • Plugin is available to access native Windows service.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

MySQL Enterprise Masking functions that masks SSN?

mask_ssn(‘302-99-8097’);

mask(‘302-99-8097’);

dataMask_ssn(‘302-99-8097’);

A

mask_ssn(‘302-99-8097’);

Data Masking ‒ String ‒ Dictionary based ‒ Specific – Social Security Number – Payment card (strict/relaxed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

MySQL Enterprise Masking functions that masks payment card?

DataMask_pam(‘3002-9911-8097’);

mask(‘3002-9911-8097’);

mask_pam(‘3002-9911-8097’);

A

mask_pam(‘3002-9911-8097’);

Data Masking ‒ String ‒ Dictionary based ‒ Specific – Social Security Number – Payment card (strict/relaxed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Why using the –initialize-insecure option to initialize the data directory insecure ?

  • The root password is used on command line
  • Has no root password generated with this option.
  • Any 8 character password will work
A

Has no root password generated with this option.

This is an insecure option, it is assumed that you intend to assign a password to the account in a timely fashion before putting the server into production use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

List the mandatory MySQL variables (pick 2)

  • basedir
  • default_storage_engine
  • datadir
  • log_err
A
  • basedir
  • datadir
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Data type used for a column to store large chunks of binary data such as images and audio files

  • BLOB
  • int
  • binary_int
  • varchar
A

BLOB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Data type to use for a column that contains only whole numbers (a number that is not a fraction)

  • int
  • Numeric Approximate Value
  • num
  • Numeric Exact Value
A

Numeric Exact Value
Int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Data type category of FLOAT and DOUBLE

  • Numeric Approximate Value
  • Numeric Exact Value
  • Dynamic Value
  • Miscellaneous Numeric Value
A

Numeric Approximate Value

28
Q

Name the MySQL storage engine that is fully ACID compliant also the default when creating a table

  • Memory
  • MyISAM
  • InnoDB
  • Flexible
29
Q

Write create table statement for mylist in sakila database (pick 1)

CREATE TABLE sakila.mylist (id INT, question INT, answer INT);

CREATE TABLE sakila.mylist INCLUDE (id INT, question INT, answer INT);

CREATE TABLE sakila.mylist VALUES (id INT, question INT, answer INT);

A

CREATE TABLE sakila.mylist (id INT, question INT, answer INT);

30
Q

Another word for “schema” in MySQL

  • project
  • booklet
  • database
  • table
A

Schema and Database

31
Q

Command used to disable autocommit mode for a single series of statements

  • BEGIN
  • START TRANSCATION
  • ROLLBACK
  • END
A

A “start transaction” statement temporarily disables autocommit (for DML).

32
Q

True or false.

A transaction be rolled back if global AUTOCOMMIT = 1

A

False

You cannot use ROLLBACK to undo the effect; however, if an error occurs during statement execution, the statement is rolled back.

33
Q

Characteristic of Enterprise Transparent Data Encryption (pick 2)

> Only the latest versions can encrypt tablespaces

> Data at Rest Encryption ‒ [System | General | Data Dictionary] Tablespaces, Undo/Redo, and Binary/Relay logs ‒ Strong encryption – AES 256

> Is transparent to applications and users ‒ No application code, schema, or data type changes

A

> Data at Rest Encryption ‒ [System | General | Data Dictionary] Tablespaces, Undo/Redo, and Binary/Relay logs ‒ Strong encryption – AES 256

> Is transparent to applications and users ‒ No application code, schema, or data type changes

34
Q

Characteristic of Enterprise Transparent Data Encryption (pick 3)

> Is transparent to DBAs ‒ Keys are hidden from DBAs – no configuration changes.

> Does not require a master key

> Requires key management ‒ Protection, rotation, storage, recovery

> Protects against attacks on database files

A

> Is transparent to DBAs ‒ Keys are hidden from DBAs – no configuration changes.

> Requires key management ‒ Protection, rotation, storage, recovery ‒ Integrates with KMIP 1.1 and KMS

> Protects against attacks on database files

35
Q

How MySQL Enterprise Firewall block SQL Injection attacks. (pick 2)

  • Allow SQL Statements that match Whitelist/ Allow list.

‒ Block SQL statements that are not on Whitelist/ Allow List.

  • Block SQL statements that contain keywords
A
  • Allow SQL Statements that match Whitelist/ Allow list.

‒ Block SQL statements that are not on Whitelist/ Allow List.

36
Q

MySQL Enterprise Security tool that allows DBAs to track user activities

  • Audit Filtering
  • MySQL Enterprise Firewall
  • Automated Allow List
  • Transparent Data Encryption (TDE)
A
  • Audit Filtering (MySQL Enterprise Audit Workflow)
37
Q

Characteristics of MySQL Enterprise Backup download (pick 2)

  • Available as part of MySQL Enterprise Edition
  • Trial release available for all versions
  • Cross platform (Windows, Linux, Unix)
A
  • Available as part of MySQL Enterprise Edition
  • Cross platform (Windows, Linux, Unix)

Download from:
‒ http://edelivery.oracle.com (trial, only most recent release)
‒ http://support.oracle.com (all releases)
‒ And OTN for non-production us

38
Q

Backup method allowing back up of only the data changed since the last FULL backup

  • Incremental Backups
  • Flexible Backups
  • Snapshots
  • Differential Backups
A

Differential Backups

39
Q

MySQL Enterprise Backup keyword for restore (pick 2)

  • copy-back
  • mysqlbackup
  • backup dir
  • copy back and apply log
A

copy-back

copy back and apply log or

40
Q

mysqldump and MySQL Shell backup types

  • differential
  • logical
  • physical
  • snapshot
41
Q

Log file used to perform Point-in-time Recovery

  • Binary Log
  • Relay Log
  • General Log
A

Binary Log

42
Q

Choice for decreasing database back up time

  • Physical Backup and Restore operations
  • logical backup
  • incremental backup
  • differential backup
A

Physical Backup and Restore operations (MySQL Enterprise Backup)

43
Q

MySQL replication default

  • enabled
  • synchronous
  • asynchronous
  • disabled
A

asynchronous

44
Q

Advantages of MySQL replication (pick 2)

> Scale-out solutions for read-heavy environment

› Quorum consensus

› Failover is automatic

› Disaster recovery

A

> Scale-out solutions for read-heavy environment
- Scaling out doesn’t involve editing the
my.cnf file.

› Disaster recovery

45
Q

Advantages of MySQL replication (pick 3)

› Quorum consensus

› Simple high availability (requires scripts and/or external tools)

› Analytics

› Long-distance data distribution

A

› Simple high availability (requires scripts and/or external tools)

› Analytics

› Long-distance data distribution

46
Q

Characteristic of MySQL Replication (pick 2)

> Data is committed all at once.

› Replication is synchronous by default.

> Data is copied from source to replica.

› Replication is asynchronous by default.

A

> Data is copied from source to replica.

› Replication is asynchronous by default.
- Can be also semi-synchronous

47
Q

Characteristic of MySQL Replication (pick 2)

› Multiple sources or replicas are possible.

› Additional replicas require
source configuration.

› Additional replicas don’t require
source configuration.

› At least 3 replicas are needed.

A

› Multiple sources or replicas are possible.

› Additional replicas don’t require
source configuration.

48
Q

Command to connect replica to source and read updated records

  • CHANGE REPLICATION SOURCE TO
  • REPLICATION SOURCE = ‘source_ip’
  • CHANGE BINLOGS TO
A

Configure replica server
- CHANGE REPLICATION
SOURCE TO

49
Q

Replication topology that does NOT implement conflict detection or resolution

Source -Replica

Replica-Replica

Replica-Source

Source -Source

A

Source -Source

50
Q

Minimum and maximum number of MySQL Servers in an InnoDB Cluster

  • there is no min or max
  • min 3, max 9
  • min 2, max 9
  • min 3, max 21
A

min 3, max 9

51
Q

Function of InnoDB Cluster (pick 2)

> PIT Recovery

> Provides virtually synchronous replication with consistent reads

> Conflict detection and resolution

A

> Provides virtually synchronous replication with consistent reads

> Automates operations
‒ Conflict detection and resolution

52
Q

Function of InnoDB Cluster (pick 2)

‒ Failure detection, failover, recovery
‒ Group membership management and creation
‒ Supports JavaScript, Python, and SQL

A

> Automates operations
‒ Failure detection, failover, recovery
‒ Group membership management and creation

53
Q

Languages supported by MySQL Shell (pick 3)

  • JavaScript
  • Cobalt
  • Python
  • SQL
A

JavaScript, Python,
and SQL

54
Q

Which component of MySQL InnoDB Cluster is a user interface that is used to achieve database high availability?

> MySQL Shell
MySQL Router
MySQL Group Replication

A

> MySQL Shell: User interface

55
Q

Which component of MySQL InnoDB Cluster that is used to achieve database high availability and directs queries to the correct server?

> MySQL Shell
MySQL Router
MySQL Group Replication

A

> MySQL Router: Directs queries to
the correct server

56
Q

Which component of MySQL InnoDB Cluster that is used to achieve database high availability and manages the continuity of service?

> MySQL Shell
MySQL Router
MySQL Group Replication

A

> MySQL Group Replication:
Manages the continuity of service

57
Q
  1. Way to replicate between two InnoDB Clusters
A

MySQL InnoDB ClusterSet
Replication between InnoDB Cluster

58
Q
  1. Schema with easy-to-understand views that contain information about IO hot spots, locking, and costly SQL statements
A

SYS Schema

59
Q
  1. Schema that provides runtime statistics to monitor MySQL server execution at a low level
A

Performance Schema

60
Q

55.Monitoring tool included with MySQL Enterprise Edition

A

Oracle Enterprise Manager for Monitoring MySQL

61
Q
  1. Public clouds that offer HeatWave
A

Public clouds that offer HeatWave
Oracle Cloud
AWS
Azure

62
Q
  1. MySQL edition HeatWave is based on
A

Powerful union of Oracle Cloud Infrastructure and MySQL Enterprise Edition

63
Q
  1. Characteristics of HeatWave
A

Use cases:
‒ OLTP only
‒ Analytics
‒ Query accelerator (OLTP+OLAP)
‒ Machine Learning
‒ LakeHouse (direct access to Object Store)
‒ Generative AI

64
Q
  1. MySQL Autopilot features that are helpful during System setup
A

Auto provision auto shape prediction

65
Q
  1. Actions that can be performed in HeatWave cloud console without any SQL coding
A

Fully managed MySQL Service and very easy to use through HeatWave cloud console
Deploy, Backup and Restore, High Availability (RPO=0), Resize, Read Replicas, etc.

66
Q

True or False:

MySQL Enterprise Backup cannot be used to perform upgrades