Re: Modeling and Normalizing
Posted by: Phillip Ballew SR.
Date: February 19, 2010 10:50AM

Rick James Wrote:
-------------------------------------------------------
> Multi-party was a wrinkle I did not know about.
> Sounds like you have a pretty good handle on it.
> So, it sounds like the vote-count table needs
> something like:
> Candidate, Party, Race, Count
> The first 3 would be the PRIMARY KEY. And you may
> want other indexes depending on the queries
> desired. (For example, an index starting with
> Race to show all the results for one race.)
Yes. I does look like that vote-count table does need those fields. I imagine the database supplying results by party candidate and race and a mix of all. As for the primary keys being three columns and indexing that is beyond my knowledge at this point. Can I get good normalization without knowing about multiple primary keys and indexing? Maybe I should hit the books again.

>
> Could the incumbent flag be moved into the
> Candidate table?
I don't think that table is necessary as moving it back to the candidate table will not create any redundant data.
>
> Your biggest table won't be more than a few
> thousand rows, right? In that case, performance
> will be fine, even if you are sloppy about
> indexes.
Correct. The row count will be less than 4k. There we go with the indexes again. :) I'll need to study more about indexes and multiple columns as primary keys.
Thanks for your help with this. I'm really challenging my thought process now. I'll look into indexes and primary/foreign keys and get back with a reworked design.

Options: ReplyQuote


Subject
Written By
Posted
February 17, 2010 05:53PM
February 18, 2010 02:29PM
February 19, 2010 10:15AM
Re: Modeling and Normalizing
February 19, 2010 10:50AM
February 20, 2010 11:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.