Seems to me that your relationships are a bit off. At first i thought that Sessions_Metadata was a cross reference between Users and Sessions. But it is not. Instead, it is extra info for a session. Now, if this were my project, i would only have two tables: Users and Sessions. It seems to me that everything in Sessions_Meta data relates to a session, therefore, why not just put those attributes in the Sessions table?
sessions Column | Type | Modifiers -------------+------------------------+----------- id | character(32) | not null a_session | text | username | character varying(40) | create_date | character varying(100) | expire | character varying(100) | query_id | character varying(50) |It will greatly simply your task. Also ... why are you using a character type for the primary key? You should be using an "auto-incremented" integer, preferably unsigned. Likewise, you should also be using the same for your primary key in the Users table.
UPDATE:
I think that is correct, CassJ.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to 5Re: Class::DBI has_a relationships
by jeffa
in thread Class::DBI has_a relationships
by CassJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |