mysequel to pilot

The internet is a blackhole of my time.Since I acquired the addiction of compulsively using the Ctrl + Click combination on links at a young age, it doesn’t take me long to have a browser have lots of tabs, like the one I have them, and subsequently the time to digest through all these links I’ve opened.
Another friend of mine, Greg J-D, wins the honorary title of being the compulsive one of all, I’ve seen 50 tabs open once across a browser on his computer.

The start of this series represents an internal desire to be more picky with my internet digestion choices, so that I will learn to chew and process the stuff I read on the internet and hopefully be able to single-out an area which I’m truly interested in. It’s easy to open lots of links, but it’s hard to decide which ones are worth your time to read. I also want to use this series to share my knowledge of technology with everyone who reads this. Rather you want it to or not, it’s taking over our lives more and more. Facebook is now the first site I open when I open Chrome. So please leave a comment on what you want to hear and I’ll do my best to share.

Today’s post will be about MySQL and NoSQL databases, implications for facebook

SQL (pronounced sequel or S-Q-L) is short for simple query language.
It’s more largely seen in the form as MySQL, which is a type of database. A database is somewhere where you store something.

So you may be scratching your head, what is a MySQL database? MySQL databases are a form of RDMS (relational database management system). Think of RDMS or MySQL databases as excel files.
In an excel file, you have headers on the first row as such http://amiworks.co.in/talk/wp-content/wbw-xls2.jpg.
Then, for each entry, you input new values on a row.

That’s the gist of RDMS.
Facebook was built from the start on a combination of MySQL +memcached. (Memcached is a database that specializes in caching, something we can talk about next time)
If you think about it, it makes a lot of sense.
When we first got Facebook, there weren’t a lot of features. Every user had to input their name, sex, interested in, relationship status, profile pic, favorite books. Stuff like that
So it totally is possible that you can input all of that in an excel file, right?
Even you could make your own facebook of the names, birthdays, sex of all your friends in excel.

But if you’re old like me, and used msn messenger, and remember that there was a limit on the number of friends you could have (or the e-mail chains that went around saying Microsoft was going to close down MSN messenger.)
Or slightly more recent, when you could only put 60??? photos on a facebook album, then you can sort of realize the limitations of MySQL.
The problem of MySQL is that as soon as you have no header, then you have no place for new information.
The fundamental problem is that a column is discrete. Even if you can add unlimited number of columns, you still have to add a column every time you have a new piece of information, and you have to update all the previous entries that were created without this column.

Structure gives us speed, gives us organization.
But if you want to develop more features, develop more unrestricted services i.e. facebook messages between different people, accommodate for that power user who wants 61 photos in his album rather than 60, then you have to move to a different paradigm, which is where NoSQL comes in.

NoSQL is not a database, it is group of databases that are grouped by the fact that they are not Relational Database Management Systems, not excel files, but things like KV store (key-value).

Even facebook’s new message system was implemented using their own Hbase, a NoSQL storage system.
NoSQL represents a shift in the database system world, represents a more flexible storage system, but not sacrificing performance. The cycle of technology is getting faster and faster. Even such a young company like facebook, compared to corporate giants like General Electronic, AT&T, are now considered behind and slow on the technological side.
MongoDB, Redis, Membase, Memcached, are just a few of the names that will be reshaping the technological world in the next few years. Not to mention, they’re opensource and free.
What has the world become?

Please leave a comment below and I’m looking for suggestions for the topic of the next blog post.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s