Thanks Tim,

On May 18, 9:15 am, Tim Lovett <[email protected]> wrote:
> Are customers different than users?
> Can customers also be users?
>
> I'd say you should probably just put the customers and users table into one.
> You can create a table that links off of users that links them to orders
> (customers) if the need arises. Or if they are two separate roles can always
> have a flag that denotes it.

Users could be customers but customers are definitely not necessarily
users. Imagine a POS application, you have users that effectively use
the application and you have customers to whom you sell products/
services. Those customers' info can be stored in the DB. Some of the
characteristics will be similar but their functions are entirely
different.


> The normalization is fine on the name breaking it out to its pieces.
>
> The problem arises though when you try to break off users and customers that
> if they are the same person they likely will need to reinsert all of their
> previous information when signing up. It just adds messiness to the database
> and makes it harder to associate their information with the user without
> somehow getting the original table's name id back to the new one. And
> imagine if they have two separate name ids... then they have to go and
> update their values in both tables.

I am adding also a CUSTOMER_TYPES table because there will be several
user types, including an EMPLOYEE type. How we'll handle that will be
a separate issue and we'll probably provide a way of copying the
information from the users table to the customers table.


> I'd personally suggest you combine all three tables unless there is a clear
> distinction between customers and users,

I believe there is a clear distinction.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to