Web Hosting Database Types
What are web hosting databases? A database is, quite simply, a place to store and retrieve data. Like a filing cabinet. This could be numbers, text, essays about Leeroy Jenkins, or 0's and 1's. In practical usage, web hosting databases store your blog entries, the date they were posted, the comments people posted with them, and your login information. It's all stored in the database.
Why do you need web hosting databases?
If you want to store any kind of data, like blog posts or comments, on your website then you need a database. If you want to use almost any type of web scripts like a blog (WordPress, b2evolution), a forum, (phpBB, bbPress), a shopping cart (ZenCart, OSCommerce), a Content Management System (Joomla, Drupal), a Photo Gallery (Coppermine), or a Wiki…(deep breath)…you need a database. Almost all web applications need web hosting databases.
Different types of web hosting databases
Can't you just use a text file to store your data? Yes, but…only one person can write to a text file at a time. What if you have 2000 visitors on your web site who all want to post a comment? It won't work. That is partly why "relational databases" were invented. A relational database is a collection of data tables. You can think of a database table as a spreadsheet. It has different types of fields across the top and each row has data for a different object. Each table can be linked, or related, to another table. These features make it easy to organize data and allow multiple people to read or write data to the database at the same time. Bring on the visitors! Popular relational web hosting databases include:
- MySQL (it's powerful, it’s free, and it is popular)
- Microsoft SQL (MS SQL) (Powerful and very popular on Windows servers. Not free :( )
- PostgreSQL (Free but includes a few more advanced features than MySQL)
Other web hosting databases that are used include:
- Oracle (Fast, super powerful, freakin' expensive)
- Microsft Access (Convenient but weak)
How do web hosting databases work?
Most modern web hosting databases use what is called SQL or Structured Query Language. This is a standard way of retrieving and modifying data in a database. A "SQL query" is a specific command to retrieve, modify or add data to a database and any database that supports SQL will be able to understand it. This is a SQL query that will retrieve all of the data in a database table:
SELECT * FROM my_customers;
This might return something like this:
You use similar SQL statements to put information into a database table (INSERT INTO my_customers (name,telephone,email) VALUES ("Sam",444,"email@example.com");).
If you want to learn more about web hosting databases, check out the documentation for the most popular web database: MySQL. W3Schools also has an excellent introduction to SQL, and you can read Philip Greenspun's "Database-backed Web Sites".
If you are looking for a web host that supports a particular type of database, look through our web hosting database which lets you compare the different hosting plan features and read reviews of web hosts. Also check out these pages:
- What is Web Hosting?
- Basic Hosting Options
- Advanced Hosting Options
- Web Hosting Types
- Best Web Hosting Company
- Windows vs. Linux Hosting
- How to switch web hosts
- Web Programming
- Hosting Control Panels
- Hosting Database Types
- What is Fantastico?
- What is SimpleScripts?