Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Setup 3

Status
Not open for further replies.

ssVBAdev

Programmer
May 23, 2003
257
US
Good Morning.

My background is mainly in VB and in the programming side of things. When it comes to Database Setup, I'm not sure where to begin.

I'd like to setup a "Client" database with a list of all my companies clients. I envision 2 tables: one with the client company general info and another with client names that would contain the name of the company they work for (thereby providing a link or connection to the other table).

This database would be used in Access (say by admin personel who control or maintain the database) and it would also be used by VBA functions in other programs such as Word and Excel to gather data from the tables within database for use in documents such as form letters, billings, quotes, and some even more complex uses (such as integration with AutoCAD - but that's down the raod a ways).

Is this making any sense? Is there easier ways to do this sort of thing right now. I must reiterate my lack of knowledge of databases. Is there information or samples I can see on the where? I have looked and not found what I am looking for yet.

Any information or assistance that you can give to get me started - or at least pointed in the right direction - would be appreciated.

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Sean,
I will look up the info on "Normalization" as you suggested.

Richard,
Ah, That all makes sense. I had setup relationships but the examples you provided were quite clear. I will also check out the link that you "retold" me about (thanks to Jeremy!!).

One question though you said:
"To properly enforce relationship, select "Enforce Referential Integrity". Since you want to cascade updates, select this option too."
Are you saying that if I select "Enforce Referential Integrity" that If I change the Company Name in the Companies table that the value will change for all of the employees (or Conctacts) on that company in the Contacts table??

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Hi

If you enforce referential integrity it will not let you change the Company Name, becuase that will break the 'relationship', but if you enforce referential integrity AND apply cascade update, then a change to company name will 'cascade' through the database (on those areas where the relationship has been defined).

Teh cascade delte is optional, since as you can imagine it may cause a significant hit, imagine if you had a table with (say) a million records in it and a cascade update setting, a single change to (say) company name would cause a million updates, you would not want that while you were waiting at the cash machine for your cash would you?


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken:
Hmm... Interesting. Don't think I'll be dealing with a million records, but your point is taken. I like the idea of a change to a company name cascading though the database. Saves having to change all the other records manually doesn't it?

Richard:
I have the document "Fundamentals of Relational Database Design" by Paul Litwin in my hot little hands as we speak (in a matter of speaking of course). Time to get out the highlighters, notepaper and... If I were at home... a beer. But, alas, I'm not at home.

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Hmmm. You said you were going to be sure to check out my link. If you had, you would have saved these fine folks the time of having to explain all this again. It's quite a common confusion, and quite understandable. But you don't have to go searching for any links, as I've already provided one. Read that article and you will be way ahead of where you're at now. Really.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Jeremy,

Have ANOTHER star for the Litwin article. I have been passing that link along to many database questioners because it IS such a fundamental in database design.

Unfortunately, since Access has made it relatively easy to create a database, there are many databases out there that it is virtually impossible to extract meaningful information from since the data is so SCREWY!!

Maybe between us we can normalize the world!

Good luck ssVBAdev!


Leslie
 
Jeremy,
As I said in my last post I am currently reading through the document. Yes, I agree that had I taken the time to grab the document and learn about databases myself, I could have saved these fine people some time. However, by the time I was able to respond to your post, I was responding to two others who seemed quite willing to help me out. Being in the middle of responding to posts and trying stuff out that was suggested to me I had to delay in getting to the document until recently.

Besides, as a helper in other forums, I understand that it is quite tempting to tell people sometimes "hey, just read the 'Help' menu and stop wasting our time." But, as a fellow helper, I am glad to take my time to help explain things that others find confusing. Sometimes, the 'help' menus are b-o-r-i-n-g and hard to follow. Hearing it from other people gives the "TIPS" more substance and more meaning.

This is the reason that I am so VERY thankful for all the time that people have spent in responding to this thread. And, as I acknowledged, I appreciate their time.

Yourself included, Jeremy.

Also, The document is proving to be very helpful, but it would not have been had I not had some of the expert "TIPS" that these people have offered.

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Leslie,
Thanks. I thought "luck" was what I would need but thanks to everyones help, and the Litwin article, things are starting to make sense. As a "programmer" I knew there had to be rhyme and reason to database setup, I just needed some direction and assistance.

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top