lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


* Sean Conner <sean@conman.org> [15/04/14 21:02]:
> 
>   One thing you really need to keep in mind:
> 
> 	"the street finds its own uses for things"
> 
> It was thus said that the Great Konstantin Osipov once stated:
> > We decided to not use a document/object model since then people
> > tend to store fat & repetitive data in the database, i.e. not
> > only values, but keys, which are mostly identical.
> 
>   And that is a problem ... why?  Keep in mind: the street finds its own
> uses for things.  Why are you restricting what your users can store?

It's just a model. Anything can be put in a list: a scalar
field, a map, an array, another list. But we chose to restrict the
top level structure to be a list of objects, not just an arbitrary
object - for example, to easily work with relational schemas
(objects - scalars), or with key-value model (key - scalar, object
- map), or with LISP-like artificial intelligence tasks.

We have push/pop/delete/insert operation for list fields, 
but they could be also treated as records, and given aliases (work
in progress), so we have get/set operations by field index or
alias. 

If everything was an object, we would be unable to assume
anything about the structure, so many things would be hard or
inefficient, or inapplicable - for example, any secondary key
would have to accept a path instead of simply a name. It's good
when *sometimes* you can build a secondary key on a path, but
sometimes you want to save storage space. 

>   Is this for persistence?  

Yes.

-- 
http://tarantool.org - a NoSQL database in a Lua script