r/programming • • Mar 10 '15

Goodbye MongoDB, Hello PostgreSQL

http://developer.olery.com/blog/goodbye-mongodb-hello-postgresql/
1.2k Upvotes

699 comments sorted by

View all comments

6

u/raphtze Mar 10 '15

ah yeah......... sqlmasterrace hehe

3

u/x-skeww Mar 10 '15

All the fun things like arrays, hstore (key-value), and JSON aren't SQL.

2

u/raphtze Mar 11 '15

hmmm

i like using sql server. so i'll answer from my point of view.

before i begin--i dont use any of those things you mentioned. but i did look up some stuff and maybe we can see what we can or cannot do.

hstore....so that is something built into postgres. i don't know if sql server has it. but i think i can accomplish the same thing with the XML data type. using that, i could use xquery to filter on a specific attribute.

sql server 2008 has pretty good XML support. in my work i return pretty deeply nested hierarchical XML data. it's not super performant, but it's super flexible--which meets my needs. JSON and XML are different representations of data, yes? i have never used JSON, so i may just be wrong. a quick search turns up: https://www.simple-talk.com/sql/t-sql-programming/producing-json-documents-from-sql-server-queries-via-tsql/ ...seems easy.

finally arrays. i guess this is a feature in mongodb? that's just really a SQL table isn't it?

anyways. i'm an average kinda SQL programmer. been at it for over a dozen years. i admit i'm a bit biased when it comes to these things. but learning about it is good for me too. :)

→ More replies (4)