flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.
https://flightaware.github.io/speedtables/
BSD 3-Clause "New" or "Revised" License
66 stars 15 forks source link

new data type #24

Closed ezx closed 12 years ago

ezx commented 12 years ago

Hello, This is not an issue, just a question. Is is possible for a speedtables data structure itself to also be a speedtables data type, therefore allowing nested data structures?

Thanks

bovine commented 12 years ago

The more typical way would be to have a second table that has a parent id column that allows one or more rows in the second table to be retrieved based on the key from the first table.

Alternatively, you can also just use a string datatype in your table and store a serialized version of a Tcl array or dict, though that loses some of the benefits of using a speedtable.

ezx commented 12 years ago

RE: nested data structure (my previous post) Thanks, I also noticed that I can do the following: [package req My-st] [my-st create st] [my-st create st::1] [my-st create st::2]

Which opens the door to other interesting possibilities.