Re: Database Relationship and Design Help

2009-02-09 Thread ramonmaruko
I thought I read somewhere that every table has to have an 'id' column in CakePHP. Anyway, I deleted the column and everything seems to be working fine still. I think I got it already. Thanks. On Feb 9, 10:40 pm, mscdex wrote: > Also, this is just a personal design decision but I would remove th

Re: Database Relationship and Design Help

2009-02-09 Thread ramonmaruko
column "member_id" in ShortTermLoan is the id of the applicant. On Feb 9, 10:27 pm, mscdex wrote: > On Feb 9, 3:11 am, ramonmar...@gmail.com wrote: > > > > > Here is what I want it to be: > > Each member can apply for zero or more short term loan(s) > > A short term loan must have 1 or up to 3 c

Re: Database Relationship and Design Help

2009-02-09 Thread mscdex
Also, this is just a personal design decision but I would remove the 'id' field on the join table and make both of the other two columns primary keys. That enforces the rule (at the database level anyway) that a member/comaker cannot be associated with the same loan multiple times. --~--~-

Re: Database Relationship and Design Help

2009-02-09 Thread mscdex
On Feb 9, 3:11 am, ramonmar...@gmail.com wrote: > Here is what I want it to be: > Each member can apply for zero or more short term loan(s) > A short term loan must have 1 or up to 3 comakers > A comaker must also be a member. > A member could be a comaker. > It matters to know which member is the

Database Relationship and Design Help

2009-02-09 Thread ramonmaruko
I'm have a problem on how I should 'design' my database for my current project. This is my current design: http://img264.imageshack.us/img264/4396/coopdbjx7.png (In the image it shows member_int, but the actual field name is member_id with a data type of int) Here is what I want it to be: E