Because you are a novice to data base design, you have fallen into a common
trap. If you think about an array, you don't want to store multiple users in
a row, you want to store them in a column. In other words, you want to have
one table that stores businesses (once per business, probably) and another
table that stores the associated users. You use a unique business ID to find
all of the users for a particular business.

Once you start thinking that way, you'll start to get the hang of it.

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com


> -----Original Message-----
> From: Sudheer Satyanarayana [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 14, 2007 1:50 AM
> To: mysql@lists.mysql.com
> Subject: Design Help Needed
>
> Hi,
>
> I'm creating an application for my web site. I want help in designing
> database tables. Currently I'm starting with user management system.
>
> The web site would have these types of users
>
> 1. Customer account
>  1a. Individual account. This user would be an individual
> with username,
> password, billing address, account security question, answer and few
> more fields.
>  1b. Business account. Each business account would have many users.
> Currently I have not decided the number of users for this type of
> account. It may be 10 users in the beginning. I want to keep
> an option
> to increase the number of users for business accounts. The business
> account will have, business name, billing address, account security
> question, answer, and few other business details. Each user
> within the
> account will have username, password, first name  last name, mobile
> number and other personal details.
> 2. Partner account. These are similar to 1b business account type.
> 3. Internal account. These are employee accounts. Each user will have
> username, password, first name, last name, department, phone
> number and
> few other fields.
>
> Ideally how many tables should I create? What are the types of
> keys(primary and foreign)
>
> Other modules of the application I would be developing in the future
> are, contact management, shopping cart, mailing lists,
> customer support,
> etc.
>
> I have MySQL 4.1 on the server. Hope my question is clear.
>
> PS: I'm new to databases.
>
>
> Thanks for the help,
> Sudheer. S
> Binary Vibes
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to