I am currently developing a project to CRUD json stuff in database using codeigniter. I don’t want to be database specific, so I don’t rely only on PostgreSQL. So is there an efficient way to manipulate .json stuff(json schema and json form structure data) in database? What would be the procedure? I am a newbie in this, so please help. Thanks in advance.
Asked
Active
Viewed 485 times
3 Answers
1
I assume you are talking about storing JSON data in PostgresSQL. You can use JSON datatype and JSON functions that are built into the latest version. Here are some links that might help you to find detailed info about this -
http://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.2#JSON_datatype
http://www.postgresql.org/docs/9.3/static/functions-json.html
And here's a previously asked question about the same topic - How do I query using fields inside the new PostgreSQL JSON datatype?
-
Sir , AB iam not using PostgresSql . I asked is their a generic method to store JNOS data in database so that i can link my project to any database not just only to PostgresSql.. i asked about active records. Thank you.. – Vikas_web Sep 10 '13 at 06:18
0
Only database I know it could be possible without supereffort is PostgreSQL version 9.3.
In SQL Server you could create clr function for working with JSON, or create and parse JSON objects manually
Some useful links:
- SQL Server SELECT to JSON function
- JSON.SQL: A CLR-resident JSON serializer/deserializer for SQL Server
- Consuming JSON Strings in SQL Server - see the resulting function(!!!)

Community
- 1
- 1

Roman Pekar
- 107,110
- 28
- 195
- 197
-
Problem is that i would host my project in some cloud so i can't rely on any one database .. thanks.. – Vikas_web Sep 10 '13 at 06:19
-