|
|
 |
RE: FN-FORUM: Advanced Databases for Beginners
date posted 6th September 2006 16:31
Dave,
Why is this so?
Bad example:
CREATE table book (
book_id INTEGER,
book_title VARCHAR(100),
book_author_id INTEGER
}
Good example
CREATE table book (
id INTEGER,
title VARCHAR(100),
author INTEGER
)
I agree with the title and author tables, (book_title/ book_author, bad bad
bad) but normally I use a specific id field - ie: 'book_id' or maybe 'bid'
so if a select statement requires id's from multiple tables that are easier
to distinguish between.
What's on the downside of naming an id field in this way?
Cheers
Mark
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Dave Cross
Sent: 06 September 2006 16:31
To: FN-FORUM / [EMAIL REMOVED]
Subject: FN-FORUM: Advanced Databases for Beginners
Last week, I was at a conference where I gave a three hour tutorial
called "Advanced Databases for Beginners" which talks about some of
more advanced database features that some beginner database designers
don't seem to use as much as they could. I thought that some people on
this list might find it useful and/or interesting so the slides are
online at
http://mag-sol.com/talks/yapc/2006/advdb/
I should point out that the slides are released under the Creative
Commons Attribution-NonCommercial-ShareAlike 2.0 Licence[1] so that
you're free to do what you want with the slides as long as you a)
credit me, b) use the same licence and c) don't use them commercially.
If you're interested in using them commercially, then please get in
touch. I'm sure we can work something out.
Enjoy,
Dave...
[1] See http://creativecommons.org/licenses/by-nc-sa/2.0/uk/ for details
--
Magnum Solutions Ltd
Open Source Consultancy, Development and Training
http://mag-sol.com/
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|