Question

In: Computer Science

MySQL Multiple Choice Answer as soon as possible 1. Why is it important to check the...

MySQL
Multiple Choice
Answer as soon as possible

1. Why is it important to check the replication status regularly by running SHOW SLAVE STATUS on the slave?
(a) Running SHOW SLAVE STATUS cleans up the binary and relay logs that are not in use.
(b) Running SHOW SLAVE STATUS syncs all tables where the data is different from the Master and Slave.
(c) Replication can have an error at any time and if you don't run SHOW SLAVE STATUS regularly you may not realize for a long time.
(d) It is not important to run SHOW SLAVE STATUS to check replication status.

2. Why is it important for an uptime monitoring service to check your website from multiple servers around the world, before considering your website down?
(a) Localized network errors may cause false alarms from individual servers.
(b) You often only need to have your website available from specific locations so you don't need to check it from locations around the world.
(c) It is not important. Checking your website from fewer servers will save greatly on electricity.
(d) It is not important. You can confirm a website is down from an individual server accurately.

3. Which of the following are correct regaring PHP's MySQLi and PDO connections to MySQL? (select all that apply)
(a) MySQLi offers a procedural API.
(b) PDO works only with MySQL.
(c) PDO and MySQLi both offer object-oriented APIs.
(d) PDO has an exception class to handle any problems that may occur in our database queries.
(e) Only PDO offers prepared statements.
(f) Both PDO and MySQLi offer protection against SQL Injection Attacks.

Solutions

Expert Solution

1.  (C)Replication can have an error at any time and if you don't run SHOW SLAVE STATUS regularly you may not realize for a long time.

This statement is to be run on a slave and provides status information on essential parameters of the replication slave threads. Minimize the problem of replication.

2.  (a) Localized network errors may cause false alarms from individual servers.

Uptime tells you how much of a given time (usually a month) the website was up (available). It lets you verify the quality of the web hosting service you use.

3.  (a) MySQLi offers a procedural API.
     (c) PDO and MySQLi both offer object-oriented APIs.
     (d) PDO has an exception class to handle any problems that may occur in our database queries.
     (e) Only PDO offers prepared statements.
     (f) Both PDO and MySQLi offer protection against SQL Injection Attacks.

Both MySQLi and PDO have their advantages:

PDO will work on 12 different database systems, whereas MySQLi will only work with MySQL databases.

So, if you have to switch your project to use another database, PDO makes the process easy. You only have to change the connection string and a few queries. With MySQLi, you will need to rewrite the entire code - queries included.

Both are object-oriented, but MySQLi also offers a procedural API.

Both support Prepared Statements. Prepared Statements protect from SQL injection, and are very important for web application security.

Hope this helps,

Software developer and computer enthusiastic.


Related Solutions

MySQL Multiple Choice Answer as soon as possible 1. Why is it important to check the...
MySQL Multiple Choice Answer as soon as possible 1. Why is it important to check the replication status regularly by running SHOW SLAVE STATUS on the slave? (a) Running SHOW SLAVE STATUS cleans up the binary and relay logs that are not in use. (b) Running SHOW SLAVE STATUS syncs all tables where the data is different from the Master and Slave. (c) Replication can have an error at any time and if you don't run SHOW SLAVE STATUS regularly...
MySQL Multiple Choice Answer as soon as possible 1. Which one of the following is not...
MySQL Multiple Choice Answer as soon as possible 1. Which one of the following is not a Replication Data Format? (a) Row (b) Mixed (c) Statement (d) Sync 2. When executing the following statement on the master: UPDATE enormous_table SET col1 = 0; Which replication format would be more efficient? (Assume enormous_table is a large table with millions of rows) (a) Statement (b) Row (c) Neither 3. When executing the following statement on the master: INSERT INTO summary_table(col1, col2, sum_col3)...
PLEASE ANSWER AS SOON AS POSSIBLE Q1-  What Social Determinant of Health is the most important in...
PLEASE ANSWER AS SOON AS POSSIBLE Q1-  What Social Determinant of Health is the most important in determining better health and health outcomes? Question 2 The Orphan Drug Act provides special patent protection and financial support from the state government for drugs designed to treat patients with diseases or conditions that effect 200,000 people or less. True False Q3- The NIH oversees the: 1. The Surgeon General 2. Homeland Security 3. National Cancer Institute 4. Environmental Protection Agency Q4: Describe the...
1. Which of the following is not a control to prevent check fraud? MULTIPLE CHOICE a....
1. Which of the following is not a control to prevent check fraud? MULTIPLE CHOICE a. Establish duties so the same person authorizes checks, signs them and reconciles the bank statement. b. Reconcile the bank account when you get the statement. c. Keep the check stock locked up. d. Perform background checks in the hiring process. 3. In a check tampering scheme the fraudster does not have to have physical access to the check. MULTIPLE CHOICE True or false 5....
CAN YOU PLEASE ANSWER ALL QUESTIONS AND PLEASE ANSWER AS SOON AS POSSIBLE 1. The processing,...
CAN YOU PLEASE ANSWER ALL QUESTIONS AND PLEASE ANSWER AS SOON AS POSSIBLE 1. The processing, where different kinds of information are processed in different brain structures, is called: a. Stream segregation b. Serial processing c. Distributed processing d. Parallel processing 2. In vision, what does dark adaptation mean? a. Decrease in color discrimination that occurs after a period in the dark b. The increased sensitivity of the eye that occurs when being in the dark for a long time...
Why is a company's corporate culture important? Multiple Choice a - Because it represents the integration...
Why is a company's corporate culture important? Multiple Choice a - Because it represents the integration of the strategy and business model that a company has adopted. b - Because it influences the organization's actions and approaches to conducting business. c - Because it guides core values and its internal code of ethics. d - Because it influences the dedication to ethical conduct and accepted work practices. e - Because it codifies formal traditions that company executives are committed to...
CAN YOU PLEASE ANSWER AS SOON AS POSSIBLE AND PLEASE ANSWER ALL QUESTIONS THANK YOU 1/...
CAN YOU PLEASE ANSWER AS SOON AS POSSIBLE AND PLEASE ANSWER ALL QUESTIONS THANK YOU 1/ What is one similarity and one difference between voluntary motor system that innervate the head versus voluntary motor system that innervate the body? 2/ Does olfactory bulb (direct) relay to primary sensory cortex via the thalamus? 3/ Write a short paragraph using the following terms: opiates; endorphins, pain relief. 4/ In your own words, explain one way in which neuroplasticity allows learning and memory...
Can you please answer all questions and please answer as soon as possible THANK YOU 1/...
Can you please answer all questions and please answer as soon as possible THANK YOU 1/ what do you think wernicke’s area of an infant develops prior to Broca’s? 2/ Create a short paragraph using the following terms: fovea, cones, rods, peripheral retina, acuity, center of the visual field? 3/ Why cone receptors are able to send information about different frequencies of light? 4/why do you think it is easier to name a taste in food than a smell in...
CAN YOU PLEASE ANSWER AS SOON AS POSSIBLE AND PLEASE ANSWER ALL QUESTIONS THANK YOU 1-...
CAN YOU PLEASE ANSWER AS SOON AS POSSIBLE AND PLEASE ANSWER ALL QUESTIONS THANK YOU 1- What is one similarity and one difference between voluntary motor system that innervate the head versus voluntary motor system that innervate the body? 2- Does olfactory bulb (direct) relay to primary sensory cortex via the thalamus? 3- Write a short paragraph using the following terms: opiates; endorphins, pain relief. 4- In your own words, explain one way in which neuroplasticity allows learning and memory...
CAN YOU PLEASE ANSWER ALL QUESTION AND PLEASE ANSWER AS SOON AS POSSIBLE THANK YOU 1....
CAN YOU PLEASE ANSWER ALL QUESTION AND PLEASE ANSWER AS SOON AS POSSIBLE THANK YOU 1. Behavioral activity is prone to a lot of variation; would Open field and Inhibitory Avoidance be valuable Primary and only endpoint measures? Explain why? 2. Lesions of the amygdala made after a delay from training result in partial retention of fear motivated Inhibitory avoidance task. On the other hand, pharmacological manipulations of the amygdala immediately after training abolished the strength of inhibitory avoidance learning....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT