Previous Thread
Next Thread
Print Thread
Rate Thread
#104551 10/15/2002 12:49 PM
Joined: Mar 2000
Posts: 162
Member
Member
Offline
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

Sponsored Links
#104552 10/16/2002 5:16 PM
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 smile Tho Charles, LK, jordo, or one of the other developers may be better suited to answer you smile


- Allen wavey
- What Drives You?
#104553 10/16/2002 5:44 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
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.

#104554 10/16/2002 8:11 PM
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.
#104555 10/16/2002 9:18 PM
Joined: Mar 2000
Posts: 162
Member
Member
Offline
Joined: Mar 2000
Posts: 162
Allen, I've been here for a while smile
Jordo and Charles, Thank you very much for your explanations smile

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)