<jaroslav.dobrek@gmail.com> wrote:
>how can I create a field that contains tuples of entities? An example:
>A model "Candidate" (someone who applies for a job) might have a field
>"languages" which is a list of tuples consisting of a language and a
>proficiency level.
That would violate practically every Codd Normal Form...
As soon as you say "list" you should be thinking of a sub-table
using "Candidate.ID" as a foreign key, with a structure somewhat like:
Languages
ID auto-increment
cID integer foreign key (Candidate.ID)
Language ??? #ad hoc string, or foreign key to standardized list
of languages
Proficiency ??? #what ever is suited for your scale
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment