Chapter 6

Data Storage, Searching and Manipulation

A schema is a collection of tables and functions in a database. There is no single schema that will satisfy the needs of every chemical database user. It might be possible to use an existing schema, perhaps one from this book, and modify it to suit the needs of a particular project. It might be necessary to examine the needs of the project and develop an entirely new schema. The purpose of this chapter is to give examples of useful schemas and to provide enough background to allow design of new schemas.


In Chapter 2, the usefulness of relational tables was introduced. Sample data from the US EPA was used to show the advantage of storing each type of data in a separate table. The data in each table remains related to the proper chemical compound through the use of a unique chemical id which functions as a unique key relating multiple tables. This will be used extensively in this and following chapters. The separation of data into multiple tables also facilitates cases where a compound may have multiple data values, also known as one-to-many relationships. This chapter will also show examples of how many-to-many relationships are handled. It will also show more examples of how the choice of data types affects the operation of the database and the applications that use it.