13.3.2012 3:51, Dennis Lee Bieber kirjoitti:
On Mon, 12 Mar 2012 22:14:27 +0100, Ervin Hegedüs<airw...@gmail.com>
declaimed the following in gmane.comp.python.django.user:
Some promotion has few millions of records, different promotions have
different format of codes, ... And general: I'm looking for an ultimate
solution, and may be the next time every ListRecord will have different
columns.
Strangely, your "ultimate solution" might mean implementing a DBMS
AS the application, rather than just USING a DBMS...
Ultimate solution sounds more like using document oriented databases,
like CouchDB or MongoDB. (Just the few I happened to remember).
That is: maintaining a data dictionary which contains "promotion
format", "promotion field", "field type", (maybe field position too,
along with fields to identify constraints on the valid values); and a
related data table in which each record holds just ONE field, with a
foreign key referencing the specific "promotion format/field" pair along
with a field containing the "record ID" (since any actual record will
take more than one table entry). The data value itself is likely going
to be a BLOB [unless you are using SQLite where you can store anything
in a field], and you use the type information to determine how to
interpret the value.
That's doable but will be pain in the ass to maintain. Also performance
is not that good since it wouldbe RDBMS on top of RDBMS.
Also all database CRUD operations would be handcrafted still. I would
definitely look using those document oriented databases which would
allow doing all that fancy stuff without too much sweat.
--
Jani Tiainen
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.