Showing posts with label allows. Show all posts
Showing posts with label allows. Show all posts

Wednesday, March 7, 2012

Database Design Questions

I'm trying to design a database that allows the users to give each individual client/company unlimited addresses and salutations. I can build the design that accommodates this, but I cannot figure out how to handle them knowing which salutation to use with a mailing they might do to the clients.

I have put the Company Name and Position (title) in the address table so that when doing a mailing the company name and title are associated with the company address being mailed too. But again, I'm not sure how they would choose a salutation if they have many choices.

Looking for any of your thoughts or suggestions.

Thank you,I'm not following you 100%, but I'll take a stab at something that might accomodate your needs:

COMPANY
id_company
company_name

COMPANY_ADDRESS
id_company_address
id_company
address_company_name
address1
address2
city
state
zip

COMPANY_SALUTATION
id_company_salutation
id_company
salutation

COMPANY_MAILING
id_company_mailing
id_company
id_company_address
id_company_salutation

When they are about to do a mailing, the COMPANY_MAILING table should be populated as desired for each company involved in the mailing.

Terri

Saturday, February 25, 2012

Database design question

I have a database that allows a client to have many addresses some are examples would be Home, Office, Vacation Home, etc... If we are mailing to a home address we would not want to the company name or title fields to be included, oh yah all files are exported to Excel for merging. I would like to put the company name and title fields in the address table so if we are mailing to a business or office the company name and title go with it, and if it is an address other than a business or office the company name and title are blank.

Does this really break any kind of rules, if we look at it as I have stated here?

Thanks for any thoughts,Yes. It is definitely breaking rules, the rules or normalization, and my guess is that you realize this or you would not be asking this question.

And sooner or later, making a bad design choice like this will come back to haunt you.

Have an Address table, and a Person table, and a Company table, and a PersonType table, and set the attributes accordningly. The query to get the data will be a bit more complex, but you'll reap the benefits of increased data integrity for a long time...|||So if I have a design like the following, how would you suggest that I exclude the companyName and ClientTitle if I'm mailing to a home address and the client has a home and company address in the address table? Thanks for your thoughts again.

tblClients
ClientID
ClientType = Indivudal or Company, etc...
CompanyName
ClientTitle

tblAddresses
AddressID
ClientID

tblClientTypeLookup = Individual, Company, etc...