mondoDB and foreign keys

i am seriously considering switching from mysql over to nosql mongoDB but i am not sure if i can live without the foreign key constraints providing me the necessary "referential integrity". i am a little surprised that mondoDB ever caught on without this feature.

i probably would never had heard about it, except its so integral to meteor that it cant be ignored.

any opinions? maybe i am too old school ?


Staff member
Most people have been doing mysql -> mariadb since it is a drop in replacement.

Are you just trying to get away from for mysql stuff completely. MongoDB is rarely used in my experience, I don't know how it will scale.
actually meteor all but requires mongoDB (nosql) unless somebody knows something i dont. it certainly would not be my first choice (probably not in the top ten) but until meteor supports mariaDB its mongoDB or nothing.

so, we give up foreign keys for meteor reactive programming. that's a tough choice. the meteor people don't see it that way, no surprise there. but using noSQL, there does not appear to be any way at the db level to enforce much of anything - not even what is in a table (oops, should say "collection")

it is pretty cool though to be able to do a nosql database insert right in the chrome command console. and not just insert, but update/delete too, query, count, etc.

again, maybe i am too old-school. is meteor worth the sacrifice ? did foreign key relationships become obsolete?
update - the mongoDB people talk quite a bit about scalability, so i am assuming that would not be a big concern.

and mongoDB has something called DBRef that might be a substitute for foreign keys, or at least close enough.

again, i would have been perfectly happy living out my days using mysql. but the use of meteor makes a pretty compelling argument for mongoDB.

of course, there is always laravel - but there is something pretty awesome about using the same language on both the client and the server. it gets confusing occasionally trying to jump between php and jScript.


New Member
Personally I use mongoDB for storing more "document" based items that are easy to understand in a JSON format. For example, it is great for storing something like web server configuration information that will be shared amongst multiple servers in a cluster.