> Hi,
>
[quoted text clipped - 19 lines]
> Questions:
> 1. How to compare A vs. B in terms of OO design, JDO (java data object)
I like B better. It looks like less work to get the account from the
user.
> 2. How to compare A vs. B in terms of db schema (with foreign key
> constraint)
I suppose A would be slightly less work to implement a ORM for, but you
could just download an ORM like Hibernate to do the work for you, so I'd
still stick with B.
> 3. C vs. D, which is better? should create user first or account first?
If the relation is 1:1, why not stick it all in one big table?
- Oliver
John_Woo - 19 Dec 2006 20:27 GMT
> > for db:
> > C. User (user_id int); Account(account_id int, user_id int)
[quoted text clipped - 4 lines]
>
> If the relation is 1:1, why not stick it all in one big table?
Good point, thanks, Oliver.
but both these two tables may extend, like USER may have 10+ fields,
same as Account table.
if they have to be separated, I'm still looking for tips on selection
of model C, D
John