|
|
Joined: Mar 2000
Posts: 162
Member
|
Member
Joined: Mar 2000
Posts: 162 |
Hello,
I wonder wether it's good to use full database normalization when dealing with flat files databases?
Also, I wonder why does UBB 6 use perl code in some of it's data files? I mean it takes more time because Perl has to compile these files.
Thanks in advance
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
howdy JB, good to see you around  Tho Charles, LK, jordo, or one of the other developers may be better suited to answer you 
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
Perl interprets the files you require (if they are simply hashes written to file) by parsing them, which is essentially what you are doing if you are reading a flat file - parsing it.
So instead of writing your own parsing routines for your own storage format (although memberlist.cgi comes to mind), it seems to me to be better in this case to rely on the existing methods as they are going to be running (according to asymptotic analysis) just as fast.
In terms of doing db normalization on the flat file db, I would guess that Charles probably does do that to some degree when deciding on new storage structures. If you look in the members directory of your 6+ series board, you are going to notice a lot of redundant data (last post histories for members, etc) to make accessing certainly commonly accessed data much faster than reading it from the current structures.
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Heh, if you think the indexes in 6.3 are redundant, wait until you see the index files we use in 6.4...
We store serialized Perl data structures rather than extruded data for two reasons:
1) Parsing time. OpenFileAsArray & split()ing results in massive slowdowns. Parsing a Perl data structure is a comparatively lightweight function
2) Simplicity. It's far easier to RequireVars (thus do()) something.
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
Joined: Mar 2000
Posts: 162
Member
|
Member
Joined: Mar 2000
Posts: 162 |
Allen, I've been here for a while Jordo and Charles, Thank you very much for your explanations 
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|