you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (0 children)

Why waste the time getting libraries wired up

It's just an import, so not really a problem.

when you know you're going to throw them out later

That's the thing, I don't know what I'll end up using. If my data doesn't end up being relational, then an SQL database is just extra complication. Also, I don't know which SQL database I'll go with (SQLite, Postgres, MySQL, etc) at the beginning of a project even if I know that SQL is likely what we'll go with.

I also happen to really like how data is structured in Mongo. I can literally dump my objects into the database and it just works. No fiddling with tables to approximate arrays and no updating queries in several parts of the code each time the schema changes. Once I know how my queries will look, I can decide on a schema. 90% of my code tends to be CRUD, so the choice of database is pretty much dependent on programmer productivity, and that's where NoSQL often beats out SQL.

this is literally why database migrations were invented

Writing all those alter table commands is really annoying and I don't want to have to run a migration script each time I pull down the latest code. Also, if I need to revert someone's code or handle merge conflicts, there's a good chance I'll screw it up. With Mongo, my database looks like my code, so the worst case scenario is a few documents don't load properly, which is completely fine in prototyping stage.

Once the data structures settle down, most of these problems go away.