Problems? Is your data what you think it is? | |
PerlMonks |
Re: Can SQL be used without a database?by CountZero (Bishop) |
on Dec 31, 2003 at 08:01 UTC ( [id://317853]=note: print w/replies, xml ) | Need Help?? |
My fellow Monks have all gone lyrical over the benefits of the use of DBI and databases (and very right they are: if you are going to use a database, DBI is the way to go and then you better at the same time install a real database engine, such as MySQL) but I fear that is perhaps not what you were asking: i.e. use SQL statements to traverse a set of hashes. If by hashes you mean the associative arrays of Perl, I don't think that you can traverse them by using SQL, or at least not in an easy and straightforward way. DBI::AnyData can use an Array of Arrays (in a particular format) as a data source and theoretically a Hash of Arrays is perhaps just as possible, but it is not documented. My advice to someone new to (Perl) programming is not to mix hashes and SQL, but rather to concentrate on getting a good grip first on each of these separately. If you will spend some more time in the Monastery, you will see that we are much better in providing practical answers to concrete questions than in discussing issues of a more general nature (where we tend to become rather filosophical). So if you provide us with some examples of your data, your data structure and perhaps some code snippets, we will gladly give you a "made to measure" solution. CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In Section
Seekers of Perl Wisdom
|
|