Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: 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 reply to Re: Can SQL be used without a database? by CountZero
in thread Can SQL be used without a database? by thegoaltender

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found