Databases are the foundation for any dynamic business. Whether it’s e-commerce, software-as-a-service (SaaS) or internal customer service tools, the database drives all data. Databases need power, and data centers in the cloud can provide that power.
The two popular database platforms are NoSQL and MySQL. Each has pros and cons, but your business model determines which one is better.
MySQL
MySQL was introduced in 1995. At the time, Microsoft SQL Server and Oracle had the market. MySQL is free, and it’s taken off since the 1990s as one of the most commonly used database servers.
MySQL is a relational database. The DBA creates tables, and each table contains a primary key, indicating the unique identification for each record. Tables that link to other tables do so with a primary and foreign key field.
For example, if a table contains customers, the customer ID is the primary key. The orders table contains each order for the customer. The orders table also has a primary key to identify the order, but a second field contains the customer ID. The orders table customer ID field is the foreign key. Using both the customer ID in the customers table and the customer ID in the orders table, the DBA can then link the tables together to query the database for record sets such as a customer and the customer’s orders.
Relational databases are perfect for structured data. They can run on small or enterprise networks. Most admins are familiar with MySQL and can manage the data.
MySQL runs some of the most popular sites. WordPress integrates with MySQL. If you own a WordPress site, you probably run MySQL as a back-end. Craigslist, Twitter, LinkedIn, and MTV are just a few of MySQL's customers.
NoSQL
NoSQL is a newer database structure. The idea for NoSQL is not to pigeonhole database designers into a set structure for all data. For instance, with relational databases, a field size is set. Any additional characters entered in that field will be truncated, losing the data.
NoSQL is more elastic than relational databases, not setting any specific size and or number of fields. NoSQL stores data in a collection of documents. The documents have a key-value structure. Queries use these key-value pairs to find linked data instead of the traditional “join” statement in relational database queries.
NoSQL is more useful for large data stores, argue most developers today. But although there is more flexibility, there is more room for error. There are fewer admins familiar with NoSQL than MySQL, so it can be more difficult to find support. However, NoSQL is easily scalable horizontally. Horizontal scalability means NoSQL can store data across multiple servers, which improves performance on large queries.
Several large companies take advantage of NoSQL's ability to handle big data. Google's BigTable technology uses NoSQL. Facebook's Cassandra uses NoSQL, and Amazon uses NoSQL with its Dynamo database product.
For most applications, MySQL has enough power and flexibility. Most admins are familiar with MySQL, so it’s the obvious choice. However, if the business plans to use big data or large record sets, NoSQL is better for data analysis with millions of records. NoSQL is also more flexible for businesses that plan to grow and need better performance than MySQL can offer.
This is a guest alert by Jennifer Marsh. Jennifer is a software developer, programmer and technology writer and occasionally blogs for open cloud company Rackspace Hosting.
Action Item: Take careful consideration when determining which database platform is more appropriate for your business model. MySQL is a relational database that is perfect for structured data. NoSQL is a newer database structure that is more elastic than relational databases — making it more useful for large data stores. MySQL is the obvious choice for most admins, however your business may need the ability to grow and scale beyond what MySQL can offer.
Footnotes: