We all know that databases get stored on hard drives. The technology used evolves all the time, but the basic principle is still the same. When you’ve got a lot of data, you need a reliable and affordable medium to store it on. With today’s capacities measured in their terabytes, you’ll certainly get a lot of storage for your money.
The only problem with hard drives is the time it takes to read and write data. The i/o speed hasn’t changed much over the years. One way to get around that problem is to use SSDs or solid-state drives. In a nutshell, they are significantly faster than conventional drives. But they cost a lot more to buy and implement in server hardware.
If you’ve got thousands of people using the same data simultaneously, speed becomes a big problem. Likewise, if you’ve got people trying to mine “big data” queries can take a long to complete.
So, how can one get around such issues? It turns out the solution has been around for a long time: in-memory databases!
What are in-memory databases?
As the term suggests, your database content gets stored in RAM rather than typical storage mediums like hard drives. The beauty of storing your data in memory is that it’s super-quick to access and modify.
Computer and server memory is cheaper to buy than an array of solid-state drives. Of course, if you’re storing gigabytes of data, you’ll need a server that can support high capacities like 256GB or 512GB of RAM.
What databases can I use that store the data in RAM?
You might not realize it, but there are plenty of scalable database solutions you can use. It’s worth spending some time doing a Google search and comparing the features from the various ones on the market.
I’d recommend a few, but your requirements may differ from the next person’s needs! For example, you might think that VoltDB is a good choice, but something like Altibase might be better. Before you do your research, think about what features are important to you and your organization. That way, you can narrow down your selection to the best ones for the job.
What happens if there’s a power cut?
The very nature of RAM means that nothing gets stored on a permanent basis. To combat things like power loss and system failure, you can set up servers with battery backup solutions. You can also have any data stored in RAM backed up to a hard drive on a frequent basis.
Running a server without some form of backup is somewhat suicidal for any important data. That’s why you need to ensure you plan for all eventualities.
The good news is that the cost of hardware for in-memory databases are cheaper than with conventional systems.
So, are in-memory databases worth it? In many applications, yes they are. But, if you’re only storing data in a small database, you may as well stick with traditional disk-based databases. I hope today’s guide has been of use to you!