Re: Question about a data structure



[snip]


Well I appreciate the answer, and that sounds fine, except with just 1000
entries, that's 150,000 records, and thinking about writing the queries to
get
the data out and use it makes my head hurt!


Not really... it's a simple SQL join - potentially a one-liner to retrieve
all the records. Add a where clause if you need to get just the detail for a
single (or multipe) master record(s), and Bob's Your Uncle. Not so hard,
believe me. If you are using mySQL, then it should be able to handle this
easily. 150,000 records isn't *that* many. I've got db's that handle
*millions* of detail table records with little performance degradation.

I've never built a table with more than about 30 fields before,
normalizing
data usually precludes that, and just naming that many fields becomes a
lot of
typing. I guess I could just use a1, a2, a3, etc. Using descriptive names
for
this data would require about 16-20 characters each, and that seems a lot
for
data that's a single byte!


He's right you know :) ... normalising things out usually (but not always)
*enhances* performance, and more important... flexibility. When your
business rules change so that you have to store 151 details, you won't have
to touch the data structure... just add more detail rows. ...a simple
example I know, but designing things properly and flexibly at the outset
saves a lot of headaches later on :)

Hope this helps.

[snip]


.



Relevant Pages

  • Re: CoBOL moved to OO
    ... > In examining the poster's objection it is therefore right and proper that I ... and writing a small OO based system; ... I'm thinking Flexus sp2 is the way to go for flexibility here (Thanks again ... a C/S package to replace the one we wrote, they're going to drop a few ...
    (comp.lang.cobol)
  • Re: PEP 3107 and stronger typing (note: probably a newbie question)
    ... I guess there may be more than one kind of flexibility. ... I fool around with sometimes that has strong static typing is Haskell. ... revision when writing in Haskell, ... Typechecks do catch some mistakes "faster", but, in my experience on ...
    (comp.lang.python)
  • Re: PEP 3107 and stronger typing (note: probably a newbie question)
    ... I recommend reading the Agile Manifesto to understand why maximal flexibility is crucial in most real-world application programming -- and therefore why, ... revision when writing in Haskell, ... Python applications. ... As we have known for a long time you can write unstructured code in almost any language, and you can do structured programming in almost any language given discipline. ...
    (comp.lang.python)
  • Re: wxPython GUI designer
    ... When it generated code I couldnt get the same level of ... flexibility as writing the code by oneself. ...
    (comp.lang.python)
  • Re: Custom query
    ... starting with "CreateQueries". ... how to do allow your users the ability to create their own queries. ... Roger dot Carlson at Spectrum-Health dot Org ... > run but would like to give the user the flexibility to> create their own queries. ...
    (microsoft.public.access.queries)