Thanks for the explanation, Joe...
Can you expand your explanation to include
the code that accomplish the constraint?
Constraints also affect updates and deletes indicentally, so that you
couldn't delete a color from the color table in his example without
first making sure that there weren't
Thanks for the details, Isaac...
Rick
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 9:57 AM
To: CF-Talk
Subject: RE: Database Model Suggestions - Elections
Thanks for the explanation, Joe...
Can you expand your explanation
Glad to help. :)
Thanks for the details, Isaac...
Rick
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/author/?id=4806
I would like to get some opinions on how best to structure a simple
election database for my intranet site.
Most of the time, an election will have different offices, or positions,
for which candidates run. In these instances, there is one candidate
running for a position.
Every now and then,
Off the cuff, I would do something like this:
Candidate
---
id (int)
name (varchar)
parent_ID (int)
dependsOnParent (bit)
parent_ID would signify which Prez the VP is affiliated with.
dependsOnParent would signify if the child (VP) can run alone or not.
The query would
Hmmm. That looks pretty good. I'll see if it will fit with the rest of
the logic.
Thanks!
M!ke
-Original Message-
From: Chris Terrebonne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 10:59 AM
To: CF-Talk
Subject: Re: Database Model Suggestions - Elections
Off the cuff, I
My bet would be on something like this:
ELECTION
electionid primary key
EMPLOYEE
employeeid primary key
ELECTIONPOSITION
electionpositionid primary key
electionid references election.electionid
runningmatepositionid
references electionposition.electionpositionid
ELECTIONCANDIDATE
Why is everyone naming their tables singularly?
:)
Will
~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message:
Standards. Tables should represent an entity, such as an employee or
candidate. Just how most of us have been taught to do it.
-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 2:37 PM
To: CF-Talk
Subject: Re: Database Model Suggestions
Here are a few general db standards:
http://livedocs.macromedia.com/wtg/public/coding_standards/database.html
[EMAIL PROTECTED] 03/29/05 01:37PM
Why is everyone naming their tables singularly?
:)
Will
~|
Logware
Here are a few general db standards:
http://livedocs.macromedia.com/wtg/public/coding_standards
/database.html
I agree with some of these but not all of them...
My list:
1) singular table names - agreed
(though I'm not too disturbed if I find one that's not)
2) descriptive primary keys
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 4:29 PM
To: CF-Talk
Subject: Re: Database Model Suggestions - Elections
Here are a few general db standards:
http://livedocs.macromedia.com/wtg/public/coding_standards/database.html
[EMAIL PROTECTED] 03/29/05 01:37PM
Why is everyone
That's strange!
I could swear my database design for mere mortals book said table names
should always be plural.
That's how I've always done them. It's only natural.
tblproducts
tbladministrators
tblsearches
etc..etc..
Singular is odd to me.
Will
Here are some of the standards I use.
http://www.cit.cornell.edu/atc/materials/old/dbdesign/erd.pdf
Will
~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting
Ruby on Rails, a framework gaining popularity quickly in the Java set,
respected by zen-coder bigwigs, relies extensively on database tables
being plural.
In the end, I think it's an old argument, and that it's probably more
important to be consistent than anything else.
-Joe
On Tue, 29 Mar
Ruby on Rails, a framework gaining popularity quickly in the
Java set, respected by zen-coder bigwigs, relies extensively
on database tables being plural.
Since Ruby on Rails uses Ruby, not Java, I suspect that once you become a
Ruby on Rails user you're more a member of the Ruby set than
I'd also say that any programming framework which relies on a
not-configurable database naming convention (as opposed to allowing db
naming conventions to be configured in the framework if not ignored)
has a significant limitation if not an outright flaw. The onTap
framework uses database
HmmmI took a look at that page and was pleased to see
that I follow the standards closely, but I've never used a
corresponding constraint name...
I've always used what I considered foreign keys, by using
the Primary Key of one table in another as a linking
field, like the Customer_ID in
to do with something like that?
Rick
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 10:49 PM
To: CF-Talk
Subject: RE: Database Model Suggestions - Elections
HmmmI took a look at that page and was pleased to see
that I follow
Hey Dave,
Oops!...I in no way meant to imply that Ruby on Rails uses Java, just
that they seem to be targeting the JSP market as their main market of
Ruby on Rails converts. There's no reason, though, you can't be a
member of both sets.
Sorry if I caused anyone any confusion - I brought it up
in the database
assigned to them, which would ...anything to do with something like that?
Rick
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 10:49 PM
To: CF-Talk
Subject: RE: Database Model Suggestions - Elections
HmmmI took a look
Hey Rick,
A constraint does just what it says - it enforces a rule.
A foreign-key constraint refers to a type of constraint that, when
placed on a column in one table, makes sure any values in that column
reference a value in a column in a second (foreign) table.
Basically, if I had the
properties in the database
assigned to them, which would ...anything to do with something like that?
Rick
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 10:49 PM
To: CF-Talk
Subject: RE: Database Model Suggestions - Elections
HmmmI
23 matches
Mail list logo