[Tutor] "Object designer" applications - are there any?

Flynn, Stephen (L & P - IT) Steve.Flynn at capita.co.uk
Mon Aug 8 11:12:39 CEST 2011

Yup - sounds more like what the final version of my little project will


At the moment, I'm more interested in taking each specific database's
version of it's DDL and converting it to an Oracle version of that DDL,
so initially it's not much more than a text converter which reads in
text describing Sybase tables and spits out DDL describing Oracle


I'll spend a day working out my objects, their methods and properties,
get that all nailed and begin the fun and games in translating my
headspace into Python.


I'll inevitably hassling you people as and when I get stuck or want some
advice on the best way to proceed, so I guess by the end of it, you'll
all be as sick of this as I will be. Share the misery...






From: ALAN GAULD [mailto:alan.gauld at btinternet.com] 
Sent: Friday, August 05, 2011 4:34 PM
To: Flynn, Stephen (L & P - IT); tutor at python.org
Subject: Re: [Tutor] "Object designer" applications - are there any?



> > I'm not sure you need OOP for this. 
> I suspect you're correct Alan, but as I'm using this an a learning
> exercise for the language it seemed too good an opportunity to miss 

That's fine so long as we understand why you are going down the OOP

> can relate a table to an "object" in my head quite easily - just need
> know how to do it in Python...

OK, So if you can conceptualise a table what are the operations 
you would perform on it?

It sounds like you want to 
- add columns - from a definition file/document?
- generate DDL based on current structure?
- export a definition document?
- Maybe autopopulate the definition from a given database connection?

So the use case nmay be something like:

Create a table connected to the old database.
The table sucks up the metadata from the database and auto-populates
itself with columns(which might be another class with name, type,size
type details)

Create a new Table object targeted at the new database (which might not
exist yet?)
If the table can't auto-populate then feed it the oold table object
which it queries for 
a description. 
The new table then populates its own definition.

Finally get the new table to generate the DDL and populate the new

You might want different table classes each based on different
so they populate themselves based on the specific meta language and spit

out a common  description format. They cn then generate their own
of DDL too...

Does that seem like a starter?

But really, when working with objects it helps to sit back and think
how you want to use them from the outside rather than thinking about
they look like inside. That way the internals will reflect what's
actually needed 
for the usage rather than some random model of what might be needed.


Alan G.


Click here
1AVZPhIxlsZ4UqhB+qagH4nqPtDbwPBBNdVeTFI5G433hQ==>  to report this email
as spam.

This email and any attachment to it are confidential.  Unless you are the intended recipient, you may not use, copy or disclose either the message or any information contained in the message. If you are not the intended recipient, you should delete this email and notify the sender immediately.

Any views or opinions expressed in this email are those of the sender only, unless otherwise stated.  All copyright in any Capita material in this email is reserved.

All emails, incoming and outgoing, may be recorded by Capita and monitored for legitimate business purposes. 

Capita exclude all liability for any loss or damage arising or resulting from the receipt, use or transmission of this email to the fullest extent permitted by law.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110808/4b444c9a/attachment.html>

More information about the Tutor mailing list