![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am looking for a small embeddable database that allows lists as datatype... |
#3
| |||
| |||
|
|
Andreas Kochenburger wrote: Hi, I am looking for a small embeddable database that allows lists as datatype... Firebird is an example of an RDBMS that has a built-in datatype that more or less does what you describe. It has a datype that is stored like a BLOB, but it is structured like a multi-dimensional array. There is an API that allows you to fetch "slices" of the array into application arrays. You can also reference individual elements of the array in SQL expressions. |
#4
| |||
| |||
|
|
If I'm right in the above, then the "slices" you refer to are "segments", and they are physical components of the BLOBS rather than logical components. |
|
Why not split out the array of lists into a table of its own, and reference the lists via a FK? In short, what can you do with lists that you can't do just as conveniently with tables? |
#5
| |||
| |||
|
|
David Cressey wrote: If I'm right in the above, then the "slices" you refer to are "segments", and they are physical components of the BLOBS rather than logical components. No, Firebird supports "array" as a distinct datatype. Arrays are logical datatypes in Firebird. They are not the same thing as physical blob segments. Internally, arrays are implemented as blobs, but there are SQL extensions to declare logical arrays with multiple dimensions. There is also expression syntax for referencing single elements or "slices" which are sub-arrays (e.g. "elements 4 through 6"). |
|
Right; using a normalized table structure is a better solution. That was the point of my post. |
#6
| |||
| |||
|
|
There are some ways in which it's reminiscent of Rdb. When I mentioned BLOBS, I figured they were like Rdb BLOBS. |
#7
| |||
| |||
|
|
Hi, I am looking for a small embeddable database that allows lists as datatype, similar to the internal database of a Prolog programming system. I.e. the data are organized in tables, so it is a relational database. But an element in a table can be a list of variable length, eg. a string list or a number list Any idea? Could SQlite do that with some magic tricky things? |
#8
| |||
| |||
|
|
Hi, I am looking for a small embeddable database that allows lists as datatype, similar to the internal database of a Prolog programming system. I.e. the data are organized in tables, so it is a relational database. But an element in a table can be a list of variable length, eg. a string list or a number list Any idea? Could SQlite do that with some magic tricky things? |
#9
| |||
| |||
|
|
However, I would echo all of Bill's warning, with this conclusion about putting lists into columns: "Abandon hope all ye who enter here." |
#10
| |||
| |||
|
|
However, I would echo all of Bill's warning, with this conclusion about putting lists into columns: "Abandon hope all ye who enter here." Thanks to all for your responses. However Prolog is a powerful programming language and command environment, and one of its key features is indeed the built-in database which can "digest" lists. I say: "Have hope all ye who enter here!" It works! ;-)) |
|
I am just looking for such a database without the other Prolog stuff. |
![]() |
| Thread Tools | |
| Display Modes | |
| |