0

Is it possible to design a twitter like DB using SQL server? a DB that will ensure high scalability and fast queries.

I am building a .NET platform that requires a similar model like twitter (User, Follower, Tweet) and looking into what will fit best in terms of fast queries and scalability.

Will it be possible using a relational DB or is a graph db much better?

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
Socardo
  • 520
  • 6
  • 14

1 Answers1

3

SQL Server will most certainly be able to handle any load that you have. SQL Azure supports databases up to 150GB (though I hear you can get more if you ask). With Azure SQL Federation, you can scale out multiple databases on hundreds of nodes around the world.

As for a relational database like SQL Server, or the "NoSQL" variants like Azure Table Storage, it depends on your needs and how structured your data is. Given you'll probably do a lot of joins, querying for followers of users, tweets that someone should see, etc. you're best bet is to go with a relational db. Even Facebook still uses MySQL, so you're not exactly in bad company with using a relational db.

mfanto
  • 14,168
  • 6
  • 51
  • 61
  • This is incorrect, facebook is using a NoSQL database they developed themselves called cassandra: http://en.wikipedia.org/wiki/Apache_Cassandra . They might use mysql somewhere but not their main backend – ntziolis Mar 15 '12 at 22:49
  • Sorry, but that's incorrect, and your link actually disproves it too. Cassandra was abandoned in 2010 in Facebook. Their usage of MySQL is well known, along with all the hardships they've encountered because of it. They have contributed an enormous amount upstream, and have given talks on how they've managed to scale MySQL. You can see on the developers page [https://developers.facebook.com/opensource/ ] "MySQL is the backbone of our database infrastructure. You can find our patches on Launchpad and learn more about how we use it on the MySQL@Facebook page." – mfanto Mar 15 '12 at 22:55
  • take everything back, but you have to be fair and mention that MySQL is only used for persistent storage and memchache is in front of MySQL doing the heavy lifting read wise and one could argue that memchache is some sort of NoSQL ;) – ntziolis Mar 15 '12 at 23:04
  • Absolutely. There's way more pieces to the puzzle than just the database. I almost added "and lots and lots of caching in between" :). But the OP was asking about storage, and it was just meant as illustrative, or more reassuring, that there's nothing inherently wrong with relational databases for _most_ people. Obviously the specifics of your application matter most though. – mfanto Mar 15 '12 at 23:07
  • absolutely agree, relational is far from dead :) – ntziolis Mar 15 '12 at 23:10