Please select the best possible answer and if possible explain why? Thank you. Q
ID: 3754623 • Letter: P
Question
Please select the best possible answer and if possible explain why? Thank you.
Question 3 (1 point) A query to get the number of indexes as well as the index names of each table in a specified database could be:
a SELECT DISTINCT t.* FROM INFORMATION_SCHEMA.STATISTICS s LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON t.TABLE_SCHEMA = s.TABLE_SCHEMA AND t.TABLE_NAME = s.TABLE_NAME AND s.INDEX_NAME = t.CONSTRAINT_NAME WHERE 0 = 0 AND t.CONSTRAINT_NAME IS NULL AND s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
b SELECT DISTINCT s.* FROM INFORMATION_SCHEMA.STATISTICS s LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON t.TABLE_SCHEMA = s.TABLE_SCHEMA AND t.TABLE_NAME = s.TABLE_NAME AND s.INDEX_NAME = t.CONSTRAINT_NAME WHERE 0 = 0 AND t.CONSTRAINT_NAME IS NULL AND s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
c SELECT DISTINCT s.* FROM INFORMATION_SCHEMA.STATISTICS s LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON t.TABLE_SCHEMA = s.TABLE_SCHEMA AND t.TABLE_NAME = s.TABLE_NAME AND s.INDEX_NAME = t.CONSTRAINT_NAME WHERE 0 = 0 AND s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
d SELECT DISTINCT s.* FROM INFORMATION_SCHEMA.STATISTICS s LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON t.TABLE_SCHEMA = s.TABLE_SCHEMA AND t.TABLE_NAME = s.TABLE_NAME AND s.INDEX_NAME = t.CONSTRAINT_NAME WHERE 0 = 0 AND t.CONSTRAINT_NAME IS NULL;
Question 5 (1 point) When table fuinfo is initially loaded with 10 million records, the email addresses were not included. You were recently supplied those email addresses and now you need to update those records. What should you do before updating those records? Questions 12 - 14 are based on the following table definition: CREATE TABLE fuinfo ( fid int(10) unsigned NOT NULL, name varchar(40) NOT NULL, email varchar(128) NOT NULL, UNIQUE KEY email (email), UNIQUE KEY fid (fid) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
a alter table fuinfo drop index email;
b drop index email on fuinfo;
c Both a and b
d Neither a nor b
Explanation / Answer
Please Note: I have answered the first Question among many questions, according to Chegg Answering Guidelines. Please Re-Post for receiving answers on the other questions.
Answer)
Question 3 (1 point) A query to get the number of indexes as well as the index names of each table in a specified database could be:
Answer)
As INFORMATION_SCHEMA.STATISTICS s will be used to select the indexes thus it will be used as select s*.
s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE' - we have to specify the table schema too.
We have to include AND t.CONSTRAINT_NAME IS NULL.
Thus the correct option will be here:
b) SELECT DISTINCT s.* FROM
INFORMATION_SCHEMA.STATISTICS s LEFT OUTER JOIN
INFORMATION_SCHEMA.TABLE_CONSTRAINTS t
ON t.TABLE_SCHEMA = s.TABLE_SCHEMA AND
t.TABLE_NAME = s.TABLE_NAME
AND s.INDEX_NAME = t.CONSTRAINT_NAME
WHERE 0 = 0 AND t.CONSTRAINT_NAME IS NULL
AND s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.