Re: [Tutor] advice on creating and working with a complex data structure

2009-07-20 Thread bob gailer
Serdar Tumgoren wrote: Hi everyone, I'm working with a database of campaign finance filings, and I'm trying to create a data structure that captures the fact that: - there can be multiple races - races can have multiple candidates - candidates can have multiple campaign committees - campa

Re: [Tutor] advice on creating and working with a complex data structure

2009-07-20 Thread Serdar Tumgoren
> Have you considered using classes? This looks like a fairly natural fit for > race, candidate, committee and maybe report casses Aha, okay, the multiple classes approach makes sense. But would these be nested classes, perhaps inheriting attributes from their parent classes? E.g.: class Race

Re: [Tutor] advice on creating and working with a complex data structure

2009-07-20 Thread Alan Gauld
"Serdar Tumgoren" wrote I'm working with a database of campaign finance filings, and I'm trying to create a data structure that captures the fact that: - there can be multiple races - races can have multiple candidates - candidates can have multiple campaign committees - campaign committe

Re: [Tutor] advice on creating and working with a complex data structure

2009-07-20 Thread Lucas P Melo
Serdar Tumgoren wrote: And of course, please let me know if there's a simpler approach I'm overlooking that would meet my requirements. As always, the advice is appreciated. You could just create some classes with methods to handle the insertion and deletion of those data. You could also keep

[Tutor] advice on creating and working with a complex data structure

2009-07-20 Thread Serdar Tumgoren
Hi everyone, I'm working with a database of campaign finance filings, and I'm trying to create a data structure that captures the fact that: - there can be multiple races - races can have multiple candidates - candidates can have multiple campaign committees - campaign committees can file m