Daniel. I agree, it would be useful for a project I'm working on now for 
our flyway database scripts for MySQL that have a few JSON type columns to 
be properly interpreted by H2 (for unit test purposes) even if it is just 
using JSON as an alias for VARCHAR or something.

Thanks guys,
Rick

On Friday, August 12, 2016 at 6:07:51 AM UTC-7, Daniel Scott wrote:
>
> Sorry to resurrect an old thread, but I'm interested to see if H2 supports 
> the json datatype, found in postgres and mysql?
>
> On Monday, 22 July 2013 19:50:39 UTC+1, Thomas Mueller Graf wrote:
>>
>> Hi,
>>
>> Hm, from the description it sounds like you currently use a relational 
>> database, and need features of a relational database (like H2, SQLite, or 
>> similar). It doesn't sound too much like a use case for JSON to me, as you 
>> don't seem to use Javascript or have a have a hierarchical or unstructured 
>> data model. Where do you actually need JSON, and can't use SQL?
>>
>> Of course you could use one of those JSON projects, but then you would be 
>> bound to use it forever and couldn't easily switch to another storage if 
>> needed. With a relational database it's relatively easy to switch as there 
>> are multiple products that support the same standard (SQL).
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>>
>> On Sat, Jul 20, 2013 at 9:32 PM, Anthony <[email protected]> wrote:
>>
>>> Hi 
>>>
>>> I do have a user case, I have a very large application that uses mdb as 
>>> its backend, with a sizable customer base. Now the system is typical 
>>> peer-to-peer networked of about 5 - 10 users per customer base.
>>> DB connection uses ADODB now one useful feature it has, is that each pc 
>>> also has to store say one or two file(s) locally that has about 2000 to 
>>> 3000 records. Now instead of having to store the data in
>>> a separate local db you can store the data to disk in an .adtg file, 
>>> then you can perform standard sql queries, as well as joins, updates etc, 
>>> rather than loading an json in memory and looping the data.
>>>
>>> Now I wish to port the application such that it is platform independent, 
>>> either web base or desktop (Lazarus) and H2 as the backend. This adtg file 
>>> is used extensively throughout the app.
>>>
>>> I am a where of xquery which is an query language for xml but json has a 
>>> much lower overhead. In my search I came across a few projects in this area 
>>> eg JSONiq, JaQL, JSonQuery, ObjectPath, UnQL. They are young, but maybe a 
>>> temp solution for now.
>>>
>>> Thanks all for your feedback. 
>>>
>>> If anyone know of a better way please reply.
>>>
>>> Regards
>>>
>>> Anthony.
>>>
>>>  
>>>  
>>>
>>>
>>>
>>> On Saturday, July 20, 2013 6:24:29 PM UTC+1, Thomas Mueller wrote:
>>>
>>>> Hi,
>>>>
>>>> What is your use case?
>>>>
>>>> I think the fact that MySQL can generate the "explain plan" in JSON 
>>>> format isn't really a good reason why H2 needs to support JSON. 
>>>>
>>>> But I do agree that JSON is important, similar than XML. Many web 
>>>> applications use JSON and some NoSQL databases support it (for example 
>>>> MongoDB).
>>>>
>>>> However, JSON in a relational database is something different. See also 
>>>> http://stackoverflow.com/questions/3564024/storing-
>>>> data-in-mysql-as-json
>>>>
>>>> If you use a relational database, I assume you want to use a solution 
>>>> that works not just in one database but in a way that is portable to many 
>>>> databases. For example storing the JSON as text. Maybe you want also want 
>>>> the ability to create indexes (similar to MongoDB).
>>>>
>>>> Luckily, you can do that already by using user defined functions. 
>>>> Similar to the XML functions in H2, that can be ported to other databases. 
>>>> I don't think supporting a JSON data type is all that important (similar 
>>>> to 
>>>> an XML data type). Just use VARCHAR or CLOB.
>>>>
>>>> I view JSON as similar important than XML. But so far there were no 
>>>> actual use cases or questions about XML support on the H2 group. So I 
>>>> assume people don't have a problem that needs to be solved. 
>>>>
>>>> So again, as for JSON, what is your use case? What problem do you need 
>>>> to solve?
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>>
>>>>
>>>> On Fri, Jul 19, 2013 at 10:49 PM, Rami Ojares <[email protected]> 
>>>> wrote:
>>>>
>>>>> I followed the first link and found a list of 4 reasons.
>>>>>
>>>>> 1. "MQL is great ... "
>>>>> Blah blah blah
>>>>> 2. "RDBMS-es are great solutions for storing and structuring data"
>>>>> Yeah well that's not a reason for MQL
>>>>> 3. "SQL ... is completely unsuitable and inappropriate for AJAX web 
>>>>> applications (for many, too many reasons)"
>>>>> Would have been nice to hear even one reason ...
>>>>> 4. "Traditional solutions to data access for AJAX web applications 
>>>>> rely on special purpose webservices, which have to be reinvented for 
>>>>> every 
>>>>> single web application"
>>>>> H2 has an undocumented network protocol that handles traffic between 
>>>>> client and server.
>>>>> Users are supposed to use that protocol through jdbc classes (or they 
>>>>> can use Jaqu if they want).
>>>>> Then there is the question of query language.
>>>>> H2 has decided to implement sql in such a fashion that it tries to be 
>>>>> compatible with other database products.
>>>>>
>>>>> Now do you want to define a new network protocol, query language or 
>>>>> both?
>>>>>
>>>>> If network protocol then I would say that the first step should be to 
>>>>> define a public specification of the H2 protocol.
>>>>> If JSON seems like a good way to define such protocol, fine.
>>>>>
>>>>> If query language then is MQL more expressive than SQL?
>>>>> I mean can you make queries with MQL that you can't with SQL?
>>>>> I would be surprised if that was the case.
>>>>>
>>>>> - Rami
>>>>>
>>>>>
>>>>> On 19.07.2013 14:19, Anthony wrote:
>>>>>
>>>>> The following points may worth a lookin.
>>>>>
>>>>> https://code.google.com/p/mql-to-sql/
>>>>>
>>>>> http://slashdot.org/topic/datacenter/why-database-
>>>>> administrators-should-consider-json/
>>>>>
>>>>>
>>>>>
>>>>> On Friday, July 19, 2013 11:31:21 AM UTC+1, Rami Ojares wrote: 
>>>>>>
>>>>>> Why would someone want json support for a database? What does it 
>>>>>> mean? If you want to query data contained inside json fragment (or xml) 
>>>>>> decompose it to relations and voila.
>>>>>> On Jul 19, 2013 12:51 PM, "Anthony" <[email protected]> wrote:
>>>>>>
>>>>>>> I notice that JSON support is way down on priority 2 list. Surely 
>>>>>>> this should be placed higher up the list.  
>>>>>>> A few of the main dbms have already implemented some form of json 
>>>>>>> support for example
>>>>>>>
>>>>>>> MariaDB / MySQL there EXPLAIN feature in version 5.6 
>>>>>>> https://blog.mozilla.org/it/2013/01/22/new-explain-featu
>>>>>>> res-in-mysql-5-6-formatjson-actually-adds-more-information/
>>>>>>>
>>>>>>> PostgreSQL 9.3 http://wiki.postgresql.org/wiki/What's_new_in_
>>>>>>> PostgreSQL_9.3#JSON:_Additional_functionality
>>>>>>>
>>>>>>> as well s the usual OODBs such as CounchDB, MongoDB (BSON), Oracle 
>>>>>>> NoSQl DB 2.0, Apache Cassandra etc
>>>>>>>
>>>>>>> As more developer are implementing some form of ajax web base 
>>>>>>> systems such a feature can only improve our productivity.
>>>>>>>
>>>>>>> Any thought on the will be appreciated.
>>>>>>>
>>>>>>> Anthony
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "H2 Database" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to [email protected].
>>>>>>> To post to this group, send email to [email protected].
>>>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>  
>>>>>>>  
>>>>>>>
>>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "H2 Database" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>  
>>>>>  
>>>>>
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "H2 Database" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>  
>>>>>  
>>>>>
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "H2 Database" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to