Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to display all the content of the database?

by Alex the Serb (Monk)
on Jan 10, 2003 at 08:06 UTC ( #225740=note: print w/replies, xml ) Need Help??


in reply to How to display all the content of the database?

Thanks everyone, but I somehow think that everything is not so clear yet.

Its not the question of which company it is, the script should work for any company or any catalog of some store or anything else. The large number of data would probably be limited with LIMIT and OFFSET clauses. But, I'm under impression that the most of you are telling me that this could be done with SQL without Perl? I have a version of MySQL which does not support subqueries. The script should work on any DBMS and use common stuff to any DBMS. The script should be generic and work in a way so that if anyone transfers it to store/stores that have different catalogs of different stuff, with different set of tables, it would still work perfectly.

For example, if we have:

section(s_id, ...);
division(d_id, s_id, ...);

the script should give:
sector 7 ... division 1 ... division 2 ... ... ... sector 8 ... division 1 ... ... ... ... ...
Then one day, they decide to add a new type of entity called department (its just a new level of depth for the script, nothing more!)

The script should then give:
sector 7 ... division 1 ... department 1 ... department 2 ... ... ... division 2 ... department 1 ... ... ... ... ... sector 8 ... division 1 ... department 1 ... ... ... ... ... ... ...
Of course some of divisions would not have departments, but that does not matter for the script, the script would display it in the correct way, because its generic. And even if some day someone add a new type of entity it would still work correctly :)

I know this is huge problem and I'm not asking you to do it, I'm just asking the small example of it with Perl using DBI, or code example of some idea or at least point me to the right direction :)

Thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-08-15 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?