database design - NoSQL or Relational or Both -


i working on project have save list of friends.after thinking lot , searching on net best way seems saving user id , friend id in table. sure if project expects reach large scale method not seem good. of large scale companies google,facebook,twitter have moved functions on nosql databases. not seem maybe should start our project these nosql databases?

but @ same time have read there lots of coding work in nosql many default services in relational databases not provided here(correct me if wrong )

maybe 1 way can start of relational has functionality on small scale , later move on nosql have write portable code orm can play role or not?

would opinion of others on can right approach this?

edit see others propose starting sql. i'd change proposition , - experiment small scale project "small twitter clone" or "store video tapes". keep database on many nodes , write scripts wich flood data. riak/cassandra , sql solution. you'll find easier , quicker. /edit

i go nosql (this i'm doing now. used mysql in large scale projects). why? simpler use can pay more attention other important things (nosql takes care of data storage problems):

  • you don't have define schema means don't have upgrade it. in mysql had long downtimes due system upgrade. adding single column/index took lot of time. tables had few millions of rows.

  • you running, distributed environment in few minutes. in mysql have manually split data between few machines (unless keep on 1 not idea).

  • you better performance. mysql performance bad. not work without memcached. memcached distributed key-value store (simple nosql database). using memcached costs additional time spent on optimizing queries

  • you don't have think normalization / denormalization

  • queries simple (at least in key-value stores). don't care like: should use "where userid = 12345" or "where userid = '12345'" (in mysql 1 of them not use indexes!).

  • if 1 machine nosql fails don't care in application. query executed on replica (you don't have implement this!)

there downsides using nosql

  • you don't acid. in cases don't need that!

  • also there more developers familiar sql solutions. on other hand nosql solutions simpler (at least in experience) don't need certified database administrator (a magician solves db problems , knows why works)

  • you can't queries - example joins not there, if don't normalize data joins useless (and save time don't have think normalization).

great article: http://labs.mudynamics.com/2010/04/01/why-nosql-is-bad-for-startups/

my advice start nosql , stick it. should @ dynamo based databases riak , cassandra. try couchdb (coachbase). of data. friends relationships graph database option.


Comments