Databases with SQLite

Datatypes

Before we can begin designing our tables, we need to be aware of what types of data SQLite can handle.

There are several datatypes available in other DB systems, but SQLite uses only the following:

Having said that, SQLite allows dynamic typing rather than the static or rigid typing, which most (all?) other database engines use.

Any column in an SQLite version 3 database, except an INTEGER PRIMARY KEY column, may be used to store a value of any storage class.

You may read about storage classes, and affinity. They are important to know about, but not crucial at this point.

Storage classes are a kind of meta-container for datatypes. Affinity is the recommended type for data stored in that column. The important idea here is that the type is recommended, not required.

A good description and explanation of storage classes, datatypes, and affinity: Datatypes In SQLite

For our purposes of creating and using a database of our digital book collection, we really only need to concern ourselves with text and numeric types.

Create DB