Get premium membership and access questions with answers, video lessons as well as revision papers.
(1)In general, index the primary key of a table if it’s not a key of the file organization. Although the SQL standard provides a clause for the specification of primary keys as discussed in Step 3.1 covered in the last chapter, note that this does not guarantee that the primary key will be indexed in some RDBMSs.
(2)Add a secondary index to any column that is heavily used for data retrieval. For example, add a secondary index to the Member table based on the column lName, as discussed above.
(3)Add a secondary index to a foreign key if there is frequent access based on it. For example, you may frequently join the VideoForRent and Branch tables on the column branchNo (the branch number). Therefore, it may be more efficient to add a secondary index to the VideoForRent table based on branchNo.
(4)Add a secondary index on columns that are frequently involved in:
(a) selection or join criteria;
(b) ORDER BY;
(c) GROUP BY;
(d) other operations involving sorting (such as UNION or DISTINCT).
(5)Add a secondary index on columns involved in built-in functions, along with any columns used to aggregate the built-in functions. For example, to find the average staff salary at each branch, you could use the following SQL query:
SELECT branchNo, AVG(salary)
FROM Staff
GROUP BY branchNo;
From the previous guideline, you could consider adding an index to the branchNo column by virtue of the GROUP BY clause. However, it may be more efficient to consider an index on both the branchNo column and the salary column. This may allow the DBMS to perform the entire query from data in the index alone, without having to access the data file. This is sometimes called an index-only plan, as the required response can be produced using only data in the index.
(6)As a more general case of the previous guideline, add a secondary index on columns that could result in an index-only plan.
kalvinspartan answered the question on July 4, 2018 at 17:12
- When would you not add any indexes to a table?(Solved)
When would you not add any indexes to a table?
Date posted: July 4, 2018. Answers (1)
- Having identified a column as a potential candidate, under what circumstances would you decide against indexing it? (Solved)
Having identified a column as a potential candidate, under what circumstances would you decide against indexing it?
Date posted: July 4, 2018. Answers (1)
- Describe the access control facilities of SQL.(Solved)
Describe the access control facilities of SQL.
Date posted: July 4, 2018. Answers (1)
- Discuss the difference between system security and data security(Solved)
Discuss the difference between system security and data security
Date posted: July 4, 2018. Answers (1)
- Explain the meaning of denormalization.(Solved)
Explain the meaning of denormalization.
Date posted: July 4, 2018. Answers (1)
- Describe the two main approaches to partitioning and discuss when each may be an appropriate way to improve performance. Give examples to illustrate your answer(Solved)
Describe the two main approaches to partitioning and discuss when each may be an appropriate way to improve performance. Give examples to illustrate your answer
Date posted: July 4, 2018. Answers (1)
- What factors can be used to measure efficiency?(Solved)
What factors can be used to measure efficiency?
Date posted: July 4, 2018. Answers (1)
- State and discuss how the four basic hardware components interact and affect system performance(Solved)
State and discuss how the four basic hardware components interact and affect system performance
Date posted: July 4, 2018. Answers (1)
- How should you distribute data across disks?(Solved)
How should you distribute data across disks?
Date posted: July 4, 2018. Answers (1)
- Compare and contrast a DDBMS with distributed processing. Under what circumstances would you choose a DDBMS over distributed processing?(Solved)
Compare and contrast a DDBMS with distributed processing. Under what circumstances would you choose a DDBMS over distributed processing?
Date posted: July 4, 2018. Answers (1)
- Discuss the advantages of a DDBMS(Solved)
Discuss the advantages of a DDBMS
Date posted: July 4, 2018. Answers (1)
- Discuss the disadvantages of DDBMS(Solved)
Discuss the disadvantages of DDBMS
Date posted: July 4, 2018. Answers (1)
- Describe the expected functionality of a replication server.(Solved)
Describe the expected functionality of a replication server.
Date posted: July 4, 2018. Answers (1)
- Discuss the Update-anywhere (symmetric replication) ownership in replication(Solved)
Discuss the Update-anywhere (symmetric replication) ownership in replication
Date posted: July 4, 2018. Answers (1)
- Discuss the workflow ownership as portrayed in replication(Solved)
Discuss the workflow ownership as portrayed in replication.
Date posted: July 4, 2018. Answers (1)
- Discuss the master/slave type of ownership model in replication(Solved)
Discuss the master/slave type of ownership model in replication
Date posted: July 4, 2018. Answers (1)
- Give a definition of an OODBMS.(Solved)
Give a definition of an OODBMS.
Date posted: July 4, 2018. Answers (1)
- Give a definition of a data warehouse. Discuss the benefits of implementing a data warehouse(Solved)
Give a definition of a data warehouse. Discuss the benefits of implementing a data warehouse
Date posted: July 4, 2018. Answers (1)
- Describe the characteristics of the data held in a data warehouse.(Solved)
Describe the characteristics of the data held in a data warehouse.
Date posted: July 4, 2018. Answers (1)
- Describe what relationships represent in an ER model and provide examples of unary, binary, and ternary relationships(Solved)
Describe what relationships represent in an ER model and provide examples of unary, binary, and ternary relationships
Date posted: July 4, 2018. Answers (1)