Here are some extra assignments for everyone who has finished the database homework and couldn't get enough ;).
Indices are a very important feature to make queries faster.
- What is a database index? Explain in your own words.
- Considering the world database used in the assignments. Here's a query:
SELECT * FROM city WHERE Population > 5000000;
Which rows in the city table will the DBMS look at to answer your query?
- Indices can be implemented with a binary search tree. Draw a binary tree
for the
Population
of the top 24 largest cities. - Explain how the following query
SELECT * FROM city WHERE Population > 5000000;
will work when we set an index on thePopulation
column. How does the database search the binary tree to answer the query? - Pick a database schema and explain which columns you think should get an index and explain for each column why you think that's a good idea.
- Implement a binary search tree that stores numbers in NodeJS.
Here is my doc file contains extra DB ....
Thanks Frank :)
https://github.com/gisaac85/myPuplicFiles/blob/master/Extra%20DB.docx