Re: [GENERAL] one-to-one schema design question and ORM

2007-03-13 Thread alexander krohn
hi. Rick Schumeyer wrote: [...] From a business rules perspective: Some users are not employees (like an admin user) Some employees are not users [...] from my view users and employees have something in common: they are persons. why don't create a person-table with the attributes the

[GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Rick Schumeyer
I'm developing a system using Ruby on Rails (with ActiveRecord) and postgres. (Although I think my question is still relevant for, say, java with hibernate.) I have two classes (tables): users and employees. A user is an account that can logon to the system, while an employee is...umm...an

Re: [GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Jorge Godoy
Rick Schumeyer [EMAIL PROTECTED] writes: I can think of two ways to do this: 1) a 1-1 relationship where the user table contains a FK to the employee table. Since not all users will be employees, the FK will sometimes be null. In rails, the user class would belong_to employee while employee

Re: [GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Bruno Wolff III
On Fri, Mar 09, 2007 at 10:06:52 -0500, Rick Schumeyer [EMAIL PROTECTED] wrote: From a business rules perspective: Some users are not employees (like an admin user) Some employees are not users I can think of two ways to do this: 1) a 1-1 relationship where the user table contains