Live data from Hacker News

MySQL is a Better NoSQL

engineering.wix.com

1–10 of 91 posts

Re: MySQL is a Better NoSQL

#5
MySQL is great and all, but if you want a better database that is considerably more powerful and supports NoSQL type scenarios: PostgreSQL. The fact that Postgres has supported working with JSON like key/value store data for a while now and it is quite decent, as well as giving you other options if you decide you want the traditional approach of tables.

Re: MySQL is a Better NoSQL

#7
This is right and wrong in the same time. Not sure which more.

Storing JSON as TEXT is great, but you really only query the data based on the mySQL index.

What if you need to query based on the site_data?

This is really not NoSQL this is just a key value store with a JSON object that is not even native type to the database, you will still need to parse back/forth.

What about updating the data? You need to get the object and then you need to parse it, change it and send it back marshalled to TEXT that MySQL can understand.

Even as a KV store, using MySQL simplifies a lot of things but there are MUCH better solutions out there.

[EDIT] One other thing that this fails to mention is that TEXT in MySQL will in most cases go to disk to get the "document" which will be slower.

In Wix case, getting a website and having all the data available this is most likely not relevant, but if you want to get multiple rows at a time, this will become a consideration for you.

Re: MySQL is a Better NoSQL

#8

Interesting that he advocates MySQL. PostgreSQL can index and interact with the JSON stored in it's columns, which make it a better choice as a NoSQL replacement. http://www.postgresql.org/docs/9.4/static/datatype-json.html

The JSON datatype is only useful if you want to query on the blob, which is not the case in Wix's case.

Re: MySQL is a Better NoSQL

#9

Interesting that he advocates MySQL. PostgreSQL can index and interact with the JSON stored in it's columns, which make it a better choice as a NoSQL replacement. http://www.postgresql.org/docs/9.4/static/datatype-json.html

I believe that MySQL 5.7 comes with JSON data types too.

https://dev.mysql.com/doc/refman/5.7/en/json.html

Re: MySQL is a Better NoSQL

#10

This is right and wrong in the same time. Not sure which more. Storing JSON as TEXT is great, but you really only query the data based on the mySQL index. What if you need to query based on the site_data? This is really not NoSQL this is just a key value store with a JSON object that is not even native type to the database, you will still need to parse back/forth. What about updating the data? You need to get the obj…

Use the last version of MySQL 5.7 that supports JSON natively:

http://dev.mysql.com/doc/refman/5.7/en/json.html

Post reply on HN