|
|||||||||||
|
[NOVICE] design of queries for sparse data
From: Andreas <maps.on(at)gmx.net>
Date: Sun Nov 11 2007 - 13:09:59 EST
I need some help to improve my design skills. :) I lately read an article about table design, that teached one shouldn't designe tables where it's clear that some columns aren't relevant for every row. It didn't span into the dirty usage details beyond the table design, though. E.g. a really simple example like a school that stores pupils like this: pupil (pupil_id, pupil_name, attends_english, attends_history, attends_maths, attends_football, attends_swimming)
So it was better to create 3 normalized tables: pupil (pupil_id, pupil_name, start_date, exit_date) classes (class_id, class_name, is_available, output_order) attends_to (pupil_id, class_id, in_year) as an n:m-relation Fine. Now I got rid off those empty columns in the pupil table. MY QUESTIONS:
Regards
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Received on Sun Nov 11 13:10:32 2007This archive was generated by hypermail 2.1.8 : Thu Jun 19 2008 - 00:03:48 EDT |
||||||||||
|
|||||||||||