a tool to reverse-engineer a schema

2010-04-27 Thread David Nicol
Has anyone extended DBD::Null to make a tool that after you run a mess
of prepare statements against the handle, it will give you some DDL to
create a schema that they will all make sense on?


-- 
I like to think that when I ramble on, I'm speaking for others who
share my opinions or point of view but who aren't as expressive.


Re: a tool to reverse-engineer a schema

2010-04-27 Thread David Nicol
I mean of course DBD::Mock, sorry
http://search.cpan.org/~drolsky/DBD-Mock-1.39/lib/DBD/Mock.pm

On Tue, Apr 27, 2010 at 9:24 AM, David Nicol davidni...@gmail.com wrote:
 Has anyone extended DBD::Null to make a tool that after you run a mess
 of prepare statements against the handle, it will give you some DDL to
 create a schema that they will all make sense on?


RE: a tool to reverse-engineer a schema

2010-04-27 Thread Martin Gainty

David-

My understanding of database design is that a database is used to organise the 
data..
so the upfront work of  define tables..columns and their relationships..DDL 
usually comes first
if a bunch of statements are thrown at the Database the database could 
conceivably cache  those statements and then 
create and or modify the schema?

you might want to consider an ORM (Object Relation Mapper) such as hibernate 
and specify lazy=true (load data only when needed)
http://www.coderanch.com/t/218722/Object-Relational-Mapping/java/fetching-lazy

more specifically you will want to control of when to create your schema 
entities are created via the
hbm2ddl.auto option which will turn on automatic generation of
database schemas directly into the database. 

http://docs.jboss.org/hibernate/stable/core/reference/en/html/tutorial.html#tutorial-firstapp-workingpersistence

hth
Martin Gainty 
__ 
Note de déni et de confidentialité
 
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: davidni...@gmail.com
 Date: Tue, 27 Apr 2010 09:26:40 -0500
 Subject: Re: a tool to reverse-engineer a schema
 To: dbi-users@perl.org
 
 I mean of course DBD::Mock, sorry
 http://search.cpan.org/~drolsky/DBD-Mock-1.39/lib/DBD/Mock.pm
 
 On Tue, Apr 27, 2010 at 9:24 AM, David Nicol davidni...@gmail.com wrote:
  Has anyone extended DBD::Null to make a tool that after you run a mess
  of prepare statements against the handle, it will give you some DDL to
  create a schema that they will all make sense on?
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

Re: dbd::oracle behavior

2010-04-27 Thread John Scoles


Ouch Sorry late reply on this one

If you are using an earlier version of DBD::Oracle and Apache::DBI  you 
might be seeing the 'PING' effect.


To keep connections alive in Apache::DBI it uses the $h-ping  which in 
older DBD does a select on a table.


260 and 360 are not very many.  I have seen rates well into the 1s 
for some other users


version 1.22+ fixed this by doing either an OCIPing if you are using 10+ 
client or another OCI call that does a round trip to the server.


Hope this helps

cheers
John Scoles

Matthew Maglinte wrote:
I'm a dba supporting a  warehouse database (production environment) 
accessed via a custom application built on open source components, one of 
which is dbd::oracle.


Performance monitoring shows two queries continually consuming 
considerable resources (cpu waits) - the query text resembling for the 
most part 'column_info' and 'table_info'.  Over any given day, the 
column_info select is executed +260 times an hour,  'table_info'  executed 
+360 times an hour.


Is this level of frequency intended?  And are these calls appropriate 
(expected) for a static data dictionary environment?


Any response that would help my understanding would be appreciated. 
Thanks.


Matt Maglinte
DBA - PeMS/LCS
Department of Transportation
W:(916)445-0090
matthew_magli...@dot.ca.gov