Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Typeless Relational Database

by Cody Pendant (Prior)
on Jul 01, 2005 at 03:59 UTC ( [id://471545]=note: print w/replies, xml ) Need Help??


in reply to Typeless Relational Database

So why can't I have the same thing from my database? Every database I've seen has been an SQL relational database. You have to take a long time specifying column types and what not.
One almost-too-obvious answer would be "because the database has to read from and write to a disk sooner or later". Your Perl variables are being managed in RAM, and Perl will do whatever it can for you until it runs out of RAM altogether.

The DB on the other hand, is reading and writing on a HD somewhere, and its function is to manage that reading and writing for you, so you don't have to worry about it. The more a DB "knows" about the kind and size of the information it's dealing with, the more efficient it can be.



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

Replies are listed 'Best First'.
Re^2: Typeless Relational Database
by tomazos (Deacon) on Jul 01, 2005 at 05:05 UTC
    I'm not sure I see the difference between reading and writing to RAM and reading and writing to the HD in this regard.

    At the end of the day the information is stored as a sequence of bytes. Whatever technique Perl uses to store a $scalar in RAM could be used in the same fashion to store it on the HD. Could it not?


    Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com
      In theory, yes; in practice, no.

      Reading/writing from/to RAM is many times faster and reorganizing the storage in RAM is much easier.

      In order to get any kind of acceptable speed out of your HD, lots of tables need to be updated and saved to allow fast access to the data.

      In RAM-storage, in a pinch you can simply walk through your RAM to find the data you need, if you do that on a HD, you can go out and get yourself a coffee (and a donut or a toasted bagel) and return before your data is found.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://471545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found