Hello Steve,

Tuesday, July 22, 2003, 4:59:04 AM, Steve Lewis wrote:

SL> Alexey,

SL> Do you have any plans for what you might want to
SL> re-use between the CMP engine and JBossdO?  The front
SL> end interfaces will be different
SL> (org.jboss.persistence.schema and
SL> org.jboss.persistence.sql) but can we encapsulate
SL> anything behind the front API for reuse?

I assume, it is off schema generation topic. Not for JBossDO. Because,
there is just no need. For new CMP engine, perhaps, the answer is yes.

SL> What exactly do you think will be the major points of
SL> difference between CMP and JBossDO for table
SL> generation?

I think, everything except JDBC calls will be different. The point
is not to write from scratch. The point is, actually, reuse. But in
our case, it is more reuse of experience rather than the codebase.
Have a look at CMP schema generation. It does its job just fine.
But can you reuse the code? Can you take out some code for reuse? Not
easily. Because it is CMP-architecture-oriented, loosely coupled with
"bridges" and specific metadata classes. But you could reuse some
ideas.

SL>   Obviously there won't be a 1-1
SL> relationship, so we'll have to grab the object graph
SL> and create tables as we move through it.

No. You need to look at SQL schema API. There is Table which has
Column's. When an application is deployed (no matter what type, e.g.
JDO or CMP), at least two schemas are built: JDO or CMP schema and SQL
schema. There is a mapping between JDO/CMP schema and SQL schema.
What you need is to actually generate database schema based on
existing SQL schema. Do you understand me?
There could be various approaches to do that. You could add a method
generate() to Table class or use some helper classes. We'll discuss it
later.

SL> Although maybe we'll want to get the entire object
SL> graph in memory and then use some sort of heuristic
SL> for generating the tables.  (We could presumably have
SL> more tables than object types, depending on how we
SL> want to use foreign keys.)

Sorry, what do you mean by object graph?
Of course, there could be more tables than object types. Or even LESS.
But these problems don't belong to schema generation. We generate
schema based on SQL schema.
The problems you touched belong to mapping from JDO/CMP schemas to SQL
schema. They are not trivial and this area will need more work also.

SL> Just trying to get in the correct mode of thought for
SL> tackling this thing.

Keep on! ;)

Thank you,

alex

SL> Thanks,
SL> Steve

>> --__--__--
>> 
>> Message: 2
>> Date: Sun, 20 Jul 2003 17:47:39 +0300
>> From: Alexey Loubyansky <[EMAIL PROTECTED]>
>> Organization: JBoss Group, LLC
>> To: Steve Lewis
>> <[EMAIL PROTECTED]>
>> Subject: Re: [JBoss-dev] JBossDO
>> Reply-To: [EMAIL PROTECTED]
>> 
>> Hello Steve,
>> 
>> very nice to meet you! In fact, no one is working on
>> schema generation
>> for JBossDO and new persistence engine at the
>> moment.
>> 
>> Saturday, July 19, 2003, 8:31:51 AM, Steve Lewis
>> wrote:
>> 
>> SL> I'd like to get involved with the JBossDO
>> project. 
>> SL> I've asked a few questions in the persistence
>> forum
>> SL> but no one has answered.
>> 
>> I'll answer. I was off-line a couple of days.
>> 
>> SL>   I know you guys are busy :),
>> SL> but I'd like to work on table generation, since
>> no one
>> SL> seems to be working on it right now.
>> 
>> You are welcome to be the first! ;)
>> 
>> SL> I'd like to see how it's currently being done by
>> the
>> SL> CMP engine and see how different it will be in
>> the JDO
>> SL> implementation.
>> 
>> For 3.X CMP, you can take a look at
>> JDBCStartCommand.java. This is
>> really the start of the process. The schema is
>> generated based on
>> the metadata.
>> For new engine, we'll need absolutely new
>> imlpementation, I think,
>> based on schema API implementation for SQL. Take a
>> look at
>> org.jboss.persistence.schema and
>> org.jboss.persistence.sql. Feel free
>> to contact me directly.
>> 
>> 
>> Thanks,
>> 
>> alex



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to