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 > how did you learn to design DBs?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-09, 12:00
Alistair Alistair is offline
Registered User
 
Join Date: Dec 2009
Posts: 12
Question how did you learn to design DBs?

Any tutorial that can CLEARLY explain how to create table relationships?

I've got a few tables (maybe too many?!?) and I just can't get my head around establishing relationships between them. I'm sure it's there in front of me but just won't see it, the more I look the more I feel I'm in deep sh|t, not a great feeling. Any advice?
Reply With Quote
  #2 (permalink)  
Old 12-14-09, 13:00
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by Alistair View Post
how did you learn to design DBs?
same as learning anything else -- practice, practice, practice

Quote:
Originally Posted by Alistair View Post
Any tutorial that can CLEARLY explain how to create table relationships?
there are hunnerts of these

do a web search for foreign key tutorial, read a few of them, then come back and ask more specific questions if you need to

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-14-09, 13:52
MarkATrombley MarkATrombley is offline
Registered User
 
Join Date: Jul 2009
Location: Michigan
Posts: 125
A relationship can only be between two tables, so break the job down to considering the relationship between every possible pair of tables. Most won't have any relationship, but at least you have considered it.
Reply With Quote
  #4 (permalink)  
Old 12-14-09, 14:12
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by r937 View Post
same as learning anything else -- practice, practice, practice
It's not only practice in "designing" the database, but using the model in your day-to-day work as well.
Only if you use the model in a real-world application you are going to understand the benefits and the drawbacks of a relational model and potential pitfalls.
Reply With Quote
  #5 (permalink)  
Old 12-14-09, 14:24
Alistair Alistair is offline
Registered User
 
Join Date: Dec 2009
Posts: 12
Quote:
Originally Posted by r937 View Post
same as learning anything else -- practice, practice, practice
Yeah, fair enough, but you make it sound like I didn't even try. On the contrary I watched a lot of video tutorials on the matter and printed out a few large ebooks as well (at work), but still I find it hard to follow the examples as their tables and fields are obviously different from mine and it's just hard to compare their scenery with mine.
I'm building a booking DB and thought I was on the right track but then I decided to add a loyalty scheme and I just can't seem to find the correct relationships no matter how many trial & errors I go through. I have now 7/8 tables and every trial takes a long time, books and tutorials are not giving me the answers I'm looking for. Well, tonight I'm a bit knackered, hopefully a good sleep will do me good. Thanks anyway.
Reply With Quote
  #6 (permalink)  
Old 12-14-09, 14:32
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by Alistair View Post
Yeah, fair enough, but you make it sound like I didn't even try.
I don't think that's what he was trying to say.

Quote:
On the contrary I watched a lot of video tutorials on the matter and printed out a few large ebooks as well (at work), but still I find it hard to follow the examples as their tables and fields are obviously different from mine and it's just hard to compare their scenery with mine.
As I said: unless you are really using the models, you will have a hard time understanding certain decisions and/or patterns.

Quote:
I'm building a booking DB and thought I was on the right track but then I decided to add a loyalty scheme and I just can't seem to find the correct relationships no matter how many trial & errors I go through. I have now 7/8 tables and every trial takes a long time, books and tutorials are not giving me the answers I'm looking for.
In those situations it always helps me to ask myself the following questions:

- What information do I want to retrieve?
- How complicated will it be to get the information I want?
- How do I update and maintain the information (is that very complicated? can I do it with a single statement?)
Reply With Quote
  #7 (permalink)  
Old 12-14-09, 18:54
AnanthaP AnanthaP is offline
Registered User
 
Join Date: May 2009
Location: India
Posts: 62
The classic introductory book (because you need a reference and not a video) was James Martin's "Principles of Data Base Management" published by Prentice Hall International havin ISBN no ISBN-0-87692-176-4

It is simple, clear an illustrated.

End
Reply With Quote
  #8 (permalink)  
Old 12-20-09, 20:17
Escherrer Escherrer is offline
Registered User
 
Join Date: Jun 2003
Posts: 4
It's like riding a bike. Tough at first but now I barely even have to think about it. I learned by having a job that allowed me to use prototyping for my first project. Design-build-show, tear it down and do it again. Over and Over until you get it right. Also it helps to ask questions. I used co-workers, forums, and even talking to a non-technical person who uses similiar software often knows the concepts of how the databsae works wiothout even knowing databases. The names and relationships of tables are usually reflected in the UIs and workflows. Unless it'd one those rediculous "One Ring to rule them all and in the darkness bind them" databases. See here for a good article:

Ten Common Database Design Mistakes
Reply With Quote
  #9 (permalink)  
Old 12-22-09, 09:57
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Quote:
Originally Posted by Alistair View Post
how did you learn to design DBs?
I started by getting advanced certification in Lego Blocks when I was a kid, followed by some independent research in Dungeons And Dragons. These prepared me well for a career as a DBA. Also, I highly recommend you acquire some Origami skills as well.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
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