Web Stack Series Part 3: The Database
Parts 1 and 2 of our look at the Web Stack introduced us to the Physical Server and the Webserver Software. Part 3 of the series brings us to the second piece of software installed on the physical server: the Database.
Dynamic, database-driven web sites have become the gold standard on the Web. Sites are updated in real time, user-generated content fills ever page, custom-tailored data targets specific users, and data is changed on the fly - all thanks to the database. It is rare to find a website that doesn’t make use of a database in some way or another. The database has become the brain of the modern web site.
So what is a database? Let’s check in with our old pal Wikipedia for a quick and dirty definition:
In computing, a database can be defined as a structured collection of records or data that is stored in a computer so that a program can consult it to answer queries.
Though this may sound simplistic, the definition is spot on. A database is nothing more than a bunch of data (usually plain text) stored and indexed in a structured manner. This allows for specific data to be found quickly and painlessly. Perhaps an analogy is in order: A library is like a database - it is a central repository of books stored in a structured system (Dewey Decimal). This system makes it easy for a person to quickly find a specific book.
The larger and more complex sites on the internet typically store all of their content in a database and retrieve the appropriate data when necessary. The web page that is requested by the user is said to “query” the database for the appropriate data to be displayed. Databases can be queried using a special language called Structured Query Language or “SQL” (pronounced like “sequel”). SQL is simply a special type of language that makes it easy and intuitive to extract data from a database. There are people who spend their entire careers mastering SQL, although you can probably teach yourself the basics of SQL in about a month or two.
Here are a couple of things you should know about database systems:
- Just like a webserver, the database system is just another piece of software
Database server software is installed on the physical server. Once installed, the database is turned on and left to run indefinitely in the background - Database systems range in price from free (MySQL, PostgreSQL) to really, really, really expensive (Oracle, Microsoft SQL Server)
The majority of small to medium sites on the Web today are run on MySQL. This is a natural consequence of it being free and easy to use. If you were to ask my opinion, I would always recommend MySQL, I love it. - Database optimization is absolutely crucial if you want your web site to scale gracefully and handle high traffic loads
Don’t be bashful about spending some money on a good developer who understands how to set up a database system properly. When your site explodes in popularity and handles all of the traffic without a hiccup, you will be thankful you did.
In the next part of this series, we will talk about the glue that connects the user, the webserver and the database all together. Make sure you are subscribed so you don’t miss out!
- Solo Signal Series: The Web Stack Explained
- Web Stack Series Part 4: Business Logic Programming
- Web Stack Series Part 1: The Physical Server
Tagged:
databases, definitions, microsoft, mysql, optimization, oracle, reference, web stack
Comments
Leave a Reply



















