If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > General Database Understanding Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-31-04, 05:04
AGISB AGISB is offline
Registered User
 
Join Date: Mar 2004
Posts: 15
General Database Understanding Question

Hi

I am experienced in Webdesign, Programming, Server Management but I am inexperienced in Database design. For a project I am developing for myself I need to learn to program a database and have read a book and searched thru Internet tutorials and forums. I think I have no problem with the first 2 normalistion forms and know that the 3NF is not always strictly necessary. My planning is nearly at the end and I know how everything should work in the end. I have however noticed that I have a big problem with my database design. The problem is that I do not know which of the 2 ways I am thinking off is the best or if there is even a better way. Let me describe what I want to do.

Database that I want to design will be in MYSQL.

My project will have to track many customers with lots of attributes. This data has to be used for php website display and has to be maintained by staff with an VB6 application (phone support etc.)
For each of those customers I will have to log many events like earned rebate points for different things they do, logins need to be stored with their IPs, earned payments and some other events. To simplify things I leave all the other info out.

No I am thinking of 2 ways to implement this:

1. I create entities CUSTOMER, LOGIN, REBATE, PAYMENTS

In LOGIN, REBATE and PAYMENTS I store the data for all users. Those tables can get very big fast as I expect many customers. From all what I have learned so far this would be the right database design approach.

2. I create an Entity CUSTOMER with limited attributes to lookup the customerID.
I create a dir customerID and basically create a database for each customer seperately in this dir.
I think that this might have an performance advantage when a customer goes to the website and the website is created with just the needed data for that customer.


The problem I have is that as an inexperienced database designer have no idea about any performance issues or any other problems with any of the 2 designs.


I would be very thankful if I can get any opinions to help me make this decision.

Thank you in advance.
Reply With Quote
  #2 (permalink)  
Old 03-31-04, 07:22
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
the columns in the customer tables that are not part of the "limited attributes" in the customer table will not be accessible to sql except one at a time

put everything into one customer table
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-31-04, 08:03
AGISB AGISB is offline
Registered User
 
Join Date: Mar 2004
Posts: 15
The 2. option is mainly done to have the eventlog tables for that customer together at the same place. In option1 they would be in one table for all customers and I might come into the problem of searching thru millions of entires from all customers.

in Option 2 I am seeing this as seperate databases

The limited CUSTOMER database is just to lookup the Customer_ID. This ID is used to open the customer database
in the directory customer_ID/customerdatabasename

Basically it comes down to having 1 huge database or 1 small global database and a database for every customer.

Actually while typing this Option 2 makes less and less sense but it would be nice to know what the difference is performance wise

Last edited by AGISB; 03-31-04 at 08:08.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On