Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please select the best possible Ans for the following questions? Thank you Quest

ID: 3754630 • Letter: P

Question

Please select the best possible Ans for the following questions? Thank you

Question 8 (1 point) Which command can be used to show that an index has been removed on table fuinfo? 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 DESCRIBE fuinfo;

b EXPLAIN fuinfo;

c SELECT * from fuinfo;

d SHOW fuinfo;

Question 9 (1 point) What are indexes in a database?

a Indexes are locations of tables within a database.

b Indexes are the quick references for fast data retrieval of data from a database.

c Indexes are the slow references for fast data retrieval of data from a database.

d Indexes are the quick references for fast data inserts of data.

Explanation / Answer

Question 8)

DESCRIBE cammand can be used to find the table structure. It gives the column name data type and constriants on each column

                     DESCRIBE tablename;

EXPLAIN command gives execution plan of a query in detail. It provides complete information about how a SQL database executes a query statement.

We can use EXPLAIN infront of usual sql queries like SELECT,DROP,UPDATE,DELETE,REPLACE to find its actual execution path.

Similar to DESCRIBE , EXPLAIN can also be used to find the table structure like

                             EXPLAIN tablename;

SELECT command retrives the content in the table. It does not give any info about table structure

SHOW command can be used to find the current ndex on the table.To get the list of index on a table use command

SHOW INDEX FROM fuinfo;

This will show all the index on table fuinfo. SO the appropriate answer is (d) SHOW command

###################################################################################

Question 9)

Indexes are like lookup tables which can be used to efficiently retreive data from database. It reduces the number of disk access their by increasing the performance of the system. Index are created by using selected columns from the databse table. These columns can be unique (Unique indexes). compiste , ie index compse of two or more database columns(composite index) . Index can also be generated from non unique columns of databse.

Another classification of index is

(a)Dense index

(b)Sparse index

In dense index their is an entry in index for all rows in database. In Sparse index records will be available for only few records/rows in databse.

When we insert a data in database, indexes are created ,updated or deleted making the insertion slower. So we should be very specific on the columns on which we have to create index and number of index we need for a database.

So the answer is (b) Indexes are the quick references for fast data retrieval of data from a database.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote