Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Building a hash of employees.

by tomhukins (Curate)
on Jul 02, 2003 at 22:02 UTC ( #270983=note: print w/replies, xml ) Need Help??


in reply to Re: Building a hash of employees.
in thread Building a hash of employees.

I agree that some sort of serialisation would help, but not necessarily XML. Others have suggested DBM or SQL databases. Personally, I find Storable quick and easy for this type of thing. If you want to use SQL, you might want to consider SQLite which I've used recently for several lightweight database applications where I didn't want a fully featured relational database server.

I like XML and use it where appropriate, but sometimes developers seem to use XML because they think everyone else does it, or because it's fashionable at the moment. If it works for you as a serialisation method, fine, use it, but make sure you consider the alternatives.

I disagree with the idea that each person can maintain his/her own profile in XML, as I would want to enforce strong data validation. You can't write a DTD to check that someone enters their age as a number, or that you can't have a birthday on June 31st. To do this, you need to check imput data using something like Params::Validate, perhaps with Regexp::Common. If you go down the XML route for this, you have to use something complicated like XML Schema.

If you want to migrate your data to a different programming environment, you can easily convert your data to XML at that point using one of Perl's many XML modules such as XML::Simple.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2021-01-27 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?