7

I'm quite new to software development and whenever I come across small projects which involve storing (relational) data I always ask myself if something like a micro-blog (or any other project with few users that stores few types of data) really need 'big' RDBMS like MySQL/MariaDB, PostgreSQL or even SQL Server, DB2 or Oracle (of course I didn't use the latter 3 but the former 2 seem very wide-spread even with very little applications).

If you look at the feature matrix of any of those software packages, it is usually massive and overwhelms me a little bit. I basically want to create a database, a bunch of tables, one or two users with specific rights to access them and that's it.

But after looking up documentation, I'll find things like 'Cascading streaming replication', 'Foreign data wrappers' or 'Materialized views with concurrent refresh' and much, much more and that always gets me thinking whether I should really read up on those things, tweak my complete configuration file and especially if those features pose a possible security threat when I don't disable them or don't know how to use them.

Basically, the whole thing just doesn't seem like it was 'made for me' and my small micro-blog, but big corporations with tons of systems and modules which need to interact with each other and exchange data in multiple formats, etc.

Of course, there is sqlite but when I last looked it seemed like it didn't support concurrency and therefore is quite unsuitable for web applications.

One One
  • 89

3 Answers3

10

They do work out of the box, for the most part, but you do have to know how to use them. They don't come pre-populated with your application's data model, because they don't know what that is, so they're a blank slate, in that respect.

SQLite will support small to medium websites with nominal concurrency and relatively low traffic, which describes probably 95 percent of all websites out there. If you're still uncomfortable using SQLite, Postgresql gives you an industrial-strength database in an executable that's about 50MB in size. Most of the major database vendors have a "lite" version, but that's really just the full-sized version with some artificial limitations imposed.

You don't need to know everything there is to know about a database in order to make full use of it. How many of the features in your favorite high-end spreadsheet or word processor do you actually know & use? Maybe 10 percent of them?

In short, databases are cheap enough that most applications with non-trivial data needs can make very good use of them.

Robert Harvey
  • 200,592
4

Basically, the whole thing just doesn't seem like it was 'made for me' and my small micro-blog

I think, this is the basic statement here.

Although your question is about Do common relational database systems work 'out of the box'?, what you are looking for is more: do I need a full featured DB for microblogging?. And there is a clear answer: No, you don't. Take a look at Static Websites and Static Site Generators. Historically, blogging was made famous with Wordpress, which is written in PHP - a very common programming language for Websites - which in turn is mostly accompanied by MySQL. This is a mere coincidence and there is no causality to say: blogging is only possible with a database.

Of course, it gives you some nice features: Your posts are data and as such queryable in every form. But on the other hand, just for microblogging it is totally overkill.

I am personally very fond of Jekyll. Perhaps, you have a look!

As far as the point of batteries included goes: If you are using a typical hosting package from a hoster of your choice, MySQL or every other DB offered is readily configured.

If you plan to host your blog yourself or run a Cloud box, e.g. one at Digital Ocean, then you have to install and configure the DB yourself; which is typically not what you want, if you only want to microblog; since there are many security implications. You have to know, what you are doing.

tl;dr

Do common relational database systems work 'out of the box'?

Yes, they work out of the box, but have to be configured properly in security terms

Basically, the whole thing just doesn't seem like it was 'made for me' and my small micro-blog

Yes, you are better off with static sites.

Thomas Junk
  • 9,623
  • 2
  • 26
  • 46
2

The database is a framework. How much you need advanced features depends on your business needs. For what you've described in terms of needs, you need SQL tables, but not the long list of other things you mention.

Start small and simple is the way to go.

Think of it as building scaffold. For a shed a few 4x4's does the trick, though only provides a frame, not a roof, shelves, etc. For a high-rise building the scaffold includes a ton more engineering features to pay attention to - but it's still a framework and not finished habitable space.

SQLite is fine for a small database with one or two users unless they are pounding on it in some heavy way. If you use a provider for this stuff you can just rely on their stuff. For instance, a Ruby on Rails application running on Heroku uses PostgreSQL.