A database is a structured collection of data that provides multiple benefits over data that's stored in a flat file format, such as a shapefile or KML. These benefits include complex queries, complex relationships, scalability, security, data integrity, and transactions, to name a few. Using databases to store geospatial data is relatively easy, considering the aforementioned benefits.
There are multiple types of database; however, the most common type of database, and the type of database that this chapter will cover, is the relational database.