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 > For professionals only... a challenging question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-05, 03:00
mcman22 mcman22 is offline
Registered User
 
Join Date: Jan 2005
Posts: 3
Question For professionals only... a challenging question


Hi all, I am new here and I hope this will be my start with you all.
I have a question I hope you can answer,


I am working on a website witch has many sub-websites the problem happened when I was building a database for the mailing list.
Let me describe the mailing list to show you where the problem is.

The website has many sub-sites and every visitor can register and choose the sub-site he/she want to receive its messages. The user has an option to receive all sites message in one message I mean all sits he is registered in.
The problem is how to test witch site the user is registered in, in other words how to build this database.


Last edited by mcman22; 01-29-05 at 03:02.
Reply With Quote
  #2 (permalink)  
Old 01-29-05, 05:47
certus certus is offline
Registered User
 
Join Date: Dec 2003
Location: Canada
Posts: 710
try this out.
Attached Images
File Type: jpg untitled.JPG (28.1 KB, 131 views)
__________________
visit: relationary
Reply With Quote
  #3 (permalink)  
Old 01-29-05, 10:20
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
good one, certus

it also needs a hierarchy, to record the "sub-site" structure
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 01-29-05, 11:01
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
I'm curious, what is the challenging part of your question?

If we understood what part you are having trouble with, it would be a lot easier to focus on that without bothering you with the parts that you already understand.

I would expect that your instructor has covered all of the parts of this process in class... Were some of the discussions unclear? Did you miss any of the sessions? That kind of information would help me help you with a problem like this.

-PatP
Reply With Quote
  #5 (permalink)  
Old 01-30-05, 04:41
mcman22 mcman22 is offline
Registered User
 
Join Date: Jan 2005
Posts: 3
thank you all for your help, i relly appreciate your help.

my problem is with this:
*********************
The user has an option to receive all sites message's in one message, I mean all sits he is registered in.
*********************

for example if the user has registered in site1,site2,site6 all the messages will be merged, and will be send as one message.

my question is how to know witch compinaion of sites did the visitor used when he registered . it my be site1,site2 and site8 OR it my be site1,site6 and site3

if the user choose the first option –to receive every site message alone- there is no problem, but, if he choose the second option –to receive all messages as one message - I will face a problem.

I hope this showed you were the challenge is.
Reply With Quote
  #6 (permalink)  
Old 01-30-05, 06:27
certus certus is offline
Registered User
 
Join Date: Dec 2003
Location: Canada
Posts: 710
The model I offered will do.
__________________
visit: relationary
Reply With Quote
  #7 (permalink)  
Old 01-30-05, 08:32
mcman22 mcman22 is offline
Registered User
 
Join Date: Jan 2005
Posts: 3
Sorry, to pother you.

but I do not know that kind of design
Reply With Quote
  #8 (permalink)  
Old 01-30-05, 15:29
chris_n_osborne chris_n_osborne is offline
Registered User
 
Join Date: Jan 2005
Posts: 31
certus offered the correct design, and graciously provided an excellent graphic of it. It's basic, and describes a set of tables that will handle your need.

To learn more, please Google the following:

"Relational Database Design"
"Database Normalization"
"1NF 2NF 3NF BCNF 4NF"

You may also wish to Google about the database product you are using.


But that aside:

In certus' design: Simply create one entry in Website for each website you have. Create one entry in Message for each message you have. Create one entry in Customer for each customer you have. In Customer_has_Website, enter the IDs of the records from the other tables, and you will have a list of which customers want which messages from which websites. Personally, I would leave the text of the message back in the Message table, but that's just me.

Last edited by chris_n_osborne; 01-30-05 at 15:37.
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