tags:

views:

84

answers:

3

Hi All,

I am making a database of my client's customers to send email promotions to. The database will include all about 12 of my clients and each of them has an average of 2100 customers. I was wondering if it would be better to have a table in the db for each one of my clients that contains a list of their customers or if I should just make one big table...

The customers will be queried daily.

I know it is a broad question but any advice would be appreciated.

Cheers,

Chuck

+3  A: 

12 * 2100 = 25200 records which is peanuts for every modern database (if you provide appropriate indexes, that is).

So make it one big table (if this will ease the querying and it is a sort of ad hoc table).

EDIT: otherwise I'd take the normalize path as duffymo suggested.

ChristopheD
+3  A: 

12 of my clients and each of them has an average of 2100 customers

This is an easy call: it's a one-to-many relationship between clients and customers, so why not have two tables with a foreign key relationship between them? The JOIN won't cost you much. I'd recommend normalizing it. The number of rows is trivial.

Make sure you add a UNIQUE constraint to the email address column in the customer table.

duffymo
+3  A: 

You won't have to worry about database performance either way, but about the number of E-Mails you send out - 25,200 E-Mails is going to put a lot of strain on your mail server.

There may be another reason to keep separate tables, though: The E-Mail addresses you work with are confidential data from separate clients. It stands to reason that keeping separate tables is an additional layer helping to prevent mix-ups. Also, tables (=clients) can easily be dumped, dropped and/or added that way.

Pekka