Databases that work well with a web server

data model diagram example

image by DOD Architecture Framework Working Group source AF 1.5 Vol.2 2003-08-15

by a reluctant coder:
To select a web server with a scripting language, one must consider the databases that that can connect to it. The most popular configuration is for an app server to connect to one database. Sometimes data comes from more than one database source. Software that your app depends on may have specific needs.

To figure out requirements, map out a database model of how your app will get, store and publish data. Will tables be independent of each other, or might there be some cross-referencing? If there’s cross-referencing, you’ll probably want to use a relational database.

Consider also the types of activities that your app will need to do, and the types of transactions for each activity.

If the app needs to be fast with lots of changing data, then you’ll want to use an in-memory database that stays in RAM memory. Sometimes it’s faster to keep all the data within the app and directly accessible by the server’s programming language. One can speed up the server even more by only saving information periodically to files or an external database.

Is transaction atomicity important? Will the database only be reading data, except allowing only one user to write to each table even under the busiest of activity?

If data has complicated connections with other data and consistency is important, you’ll need an ACID compliant database.

If you will be collecting data from different sources, you may want to use a database with a standardized query language (SQL). SQL makes it easier to switch between sources by communicating in a mostly common query language.

If data only changes periodically, you might be able to get away serving static files. And pre-process data into static files as needed.

Once you’ve figured out requirements, look for databases that work with your choice of server and programming language.

Next post is about choosing an operating system.