Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is 78 fields per table too much??
Message
From
15/06/2004 09:36:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/06/2004 07:34:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00913804
Message ID:
00913849
Views:
13
The real question is, is the structure efficient to access data?

I don't know how relevant the following is for your case, but here goes.

If you have the same type of data in the different fields, it may be difficult to access it. Here is a case I investigated years ago:

Say you have different subjects in which a student registers, and grades (from exams). You decide to keep the entire student record for one semester in one record.

Problem #1: If you keep 6 fields for the subject and another 6 fields for the corresponding grades, you may be in for a surprise, when it turns out that an exception is made, and a student is allowed to study a 7th. or 8th. subject. You will need a major redesign! On the other hand, for the student who studies only 1 or 2 subjects, a lot of space is wasted. (Note: The waste of space is irrelevant, compared with the other problems.)

Problem #2: If I want to get all grades for math, for instance, I have to search through the 6x2 fields. This requires a fairly complex logic.

If, on the other hand, I had stored the information in a normalized form (i.e., one record for each grade), nowadays, a single SELECT statement can get the information!

>I am building an additional table (.DBF) for my VFP8 application. I'm trying to normalize, de-normalize to maxium efficiency. If this data does not need to be split up (normalized) between 2 or more tables, I'd prefer keeping it in one table. I'll have at least 78 fields (13 distinct entities times a multiple; eg. 6 sets = 13 * 6; 7 sets = 13 * 7, etc.)
>
>Thanks,
>
>dbk
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform