26 Jun 05:37
metakit relational questions
From: davidm <rebirth <at> orcon.net.nz>
Subject: metakit relational questions
Newsgroups: gmane.comp.db.metakit
Date: 2007-06-26 03:40:56 GMT
Subject: metakit relational questions
Newsgroups: gmane.comp.db.metakit
Date: 2007-06-26 03:40:56 GMT
Hi, I worked out how to do nested views (from trawling through list archives, it isn't mentioned in the python documentation) - this is great for emulating a simple SQL join. But how do you do two tables that relate to each other? For example, imagine one table called 'Director' which has the columns: - name (string) - age (int) - companies (related join to Company) and another table called 'Company', which has the columns: - name (string) - directors (related join to Person) The situation is that each person, represented by a row in Director, could be a director of more than one company, and each company would often have two or more directors. I'm familiar with SQLObject, where this can be very easily accomplished with 'RelatedJoin' column types. But is there a way to do this in Metakit? For example, given a person, look up the list of companies of which s/he is a director, and for a company, look up the list of directors?(Continue reading)
RSS Feed