RE: Database Model Suggestions - Elections

2005-03-30 Thread S . Isaac Dealey
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

RE: Database Model Suggestions - Elections

2005-03-30 Thread Rick Faircloth
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

RE: Database Model Suggestions - Elections

2005-03-30 Thread S . Isaac Dealey
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

Database Model Suggestions - Elections

2005-03-29 Thread Dawson, Michael
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,

Re: Database Model Suggestions - Elections

2005-03-29 Thread Chris Terrebonne
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread Dawson, Michael
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread S . Isaac Dealey
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Will Tomlinson
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:

RE: Database Model Suggestions - Elections

2005-03-29 Thread Steve Brownlee
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Chris Terrebonne
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread S . Isaac Dealey
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread Rick Faircloth
[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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Will Tomlinson
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Will Tomlinson
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Joe Rinehart
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread Dave Watts
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread S . Isaac Dealey
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread S . Isaac Dealey
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread Rick Faircloth
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Joe Rinehart
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Joe Rinehart
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

Re: Database Model Suggestions - Elections

2005-03-29 Thread Joe Rinehart
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

RE: Database Model Suggestions - Elections

2005-03-29 Thread Rick Faircloth
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