-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/31/2011 11:53 AM, Alexey Pechnikov wrote:
> A normalized database can't be easy replicated and checked.

That is what makes these databases (variously document oriented or JSON) so
attractive.  There is no rigid schema and no two documents need to have the
same structure.  They are not normalized.  This allows the developer to be
considerably more flexible (with great power comes great responsibility) and
the objects are easy to check, replicate and shard as atomic units.

> CouchDB has simple replication as result of simple
> database schema.

Careful with the wording there.  Multi-master replication is always hard
which is why it is so rare.

The simplicity of the document model is because you put everything relevant
into a single item which typically matches the programmer's idea of an object.

> You can create simple schema of SQLIte database and
> will have simple replication.

SQL doesn't really allow for simple schemas.  It is hard to do things like
lists and items containing other items - how many normal forms are we up to now?

> It's trivial to add Tcl language to SQLite as example:

In my opinion there is no need to add any scripting to SQLite.  User defined
functions, virtual tables etc let the developer do things in whatever way
pleases them.  About the only place that seems to need more is complex triggers.

> And we can add javascript support for JSON data processing. 

You don't need javascript to deal with JSON but you do need a syntax and
using native javascript is sensible.  For example if you have this object
and want to get the value of bar from within foo then how do you specify it?

  {"foo": {"bar": 3} }

MongoDB's query syntax and both MongoDB and CouchDB's map/reduce all use
foo.bar.  This conflicts with SQL syntax since it only allows for
[database.]column and it isn't clear from the UnQL pages how they handle it.

> Are you really want it?

You can already use Javascript with SQLite.  Most webbrowsers provide a
happy marriage of the two.  Javascript does however have some issues
especially the lack of a binary type and treating all numerics as floating
point.

Related trivia:  Way back in 1994 I presented at the Second World Wide Web
conference showing TCL integrated into the Mosaic browser in order to script
it and got rapturous applause.  Sadly Netscape decided to create Javascript
instead ...

Roger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk41shEACgkQmOOfHg372QQcSwCeM8/9IuD99QMV4AtEDXJVn8AO
xg0AoKkRnB70f7Mk3cniU968Yvx2QtCV
=oIzp
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to