Scenario:
Assume a table called 'tvshow' with the following data:
### begin_: tvshow table
type ;; title ;; fname ;; lname
sitcom ;; simpsons ;; homer ;; simpson
sitcom ;; simpsons ;; ned ;; flanders
sitcom ;; flintstones ;; fred ;; flintstone
sitcom ;; flintstones ;; wilma ;; flintstone
sitcom ;; flintstones ;; barney ;; rubble
gameshow ;; price is right ;; bob ;; barker
gameshow ;; jeopardy ;; alex ;; trebek
Question:
Does there exist anything that will allow that data to be queried in a manner such as (or substantially similar to):
### begin_: query pseudo-code
TREE_SELECT type,title,fname,lname
FROM tvshow
WITH_LEVEL (1,'type' )
WITH_LEVEL (2,'title' )
WITH_LEVEL (3,'lname','fname' )
WHERE type = 'gameshow'
... producing the result ...
gameshow
price is right
barker,bob
jeopardy
trebek,alex
Caveats:
Assume the only important question is whether such a query syntax exists as either a published spec or (even better) runnable code somewhere.
It is nice to have a perl-based solution that returns the results in structured (e.g., XML, perl data structure, YAML) format, but for now, mere confirmation of whether this exists somewhere (and if so, how is it implemented and what is it called) would be enough. The purpose is due-dilligence before re-inventing this particular wheel, assuming it *is* a wheel.
=oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|