ABSTRACT

This chapter provides the tools necessary to set up a new database and populate it. Two related but different concepts are keys and indices. The former offers some performance advantages but is primarily useful for imposing constraints on possible entries in the database, while the latter is purely about improving the speed of retrieval. Foreign keys don't offer any performance enhancements, but they are important for maintaining referential integrity, especially in transactional databases that have many insertions and deletions. While keys help maintain the integrity of the data, indices impose no constraints—they simply enable faster retrieval. An index is a lookup table that helps structured query language keep track of which records contain certain values. The extract-transform-load paradigm is common among data professionals. The idea is that many data sources need to be extracted from some external source, transformed into a different format, and finally loaded into a database system.