in reply to [meditation] Structured, Typed Program Catalogs

Statistics on the SQL queries? That should be easy. Just turn on the appropriate feature of your database such that all queries are logged, and run the test suite of your program(s). You do have a good test suite that runs all parts of the code, don't you?

I would also assume that any large program doesn't contain any SQL code - that all SQL code is found in a separate layer. Preferably two layers, one in "application space", in a library (or module), which calls stored procedures in the database. The stored procedures themselves will contain the queries. Programs should never touch tables themselves - that's as dirty as using global variables, or accessing attributes of alien classes directly.

Abigail

  • Comment on Re: [meditation] Structured, Typed Program Catalogs

Replies are listed 'Best First'.
Re: Re: [meditation] Structured, Typed Program Catalogs
by RMGir (Prior) on Nov 19, 2002 at 14:25 UTC
    Resonable, IF your database supports stored procedures.

    I don't think mysql supports them yet, does it?

    Still, you can get most of the same benefits by having a SQL details abstraction layer in Perl.
    --
    Mike

      That just shows that MySQL is just there for toy applications. Noone is interested in a break-down of SQL queries of (or has 1000 queries in) a toy application.

      I just find it mind boggling people use MySQL in applications they take serious. But then, people run services they find important on Windows machines as well.

      Abigail

        True, it does boggle the mind, but it also happens...
        --
        Mike, in the middle of converting a database that's run into MySQL's capactity limits to Oracle...