Objects by Design Forums Pages (2): [1] 2 »
Show 15 posts from this thread on one page

Objects by Design Forums (http://forums.objectsbydesign.com/index.php)
- UML Questions (http://forums.objectsbydesign.com/forumdisplay.php?forumid=6)
-- Data modelling vs object oriented modelling (http://forums.objectsbydesign.com/showthread.php?threadid=467)


Posted by venkat on 09-27-2002 10:09 AM:

Angry Data modelling vs object oriented modelling

Folks,

It is true that most of our development nowadays are object oriented (phew! people are really seeing the benefits of OO). But the problem comes when we have to have a relational database management system for object persistence. I find people are still holding to their data modelling expertise and trying to colour OO modelling with their data modelling experience (meaning objects are assigned responsibilities based on the tables that they populate). What is the best way for a person with lot of data modelling experience learn OO modelling without having a bias towards data modelling techniques? Does data modelling techniques still hold good while assigning resposibilities to objects. What happens when you have to work with legacy systems which have a good datamodel? I hope veterans of OOAD shall clear my doubts. Any thoughts on these questions are thanked for in advance.

__________________
Known is a drop..unknown is an ocean


Posted by SZ on 10-10-2002 02:42 AM:

Good question. One of the key things to focus on when learning OO is inheritance. In this sense a data-modeling focus can limit your perspective since tables tend to be pretty flat. It is interesting in this regard that a database such as PostgreSQL does implement a form of inheritance where one table may extend (inherit) another table.

I would add to the challenge today that XML schemas are adding yet another dimension to the complexity. There is just too much data transformation going on! XML is becoming very prominent both for communications (SOAP) as well as presentation (XSLT). Now you have to shuffle your data from the database to objects to XML (and then back again on the recieving side with SOAP).

The originators of OO databases understood this problem (they called it impedance mismatch, I believe) but these databases have simply not competed with relational databases. You also have the pure XML databases today but these still represent a small market so far.


Posted by bparanj on 10-11-2002 04:19 PM:

Re: Data modelling vs object oriented modelling

Read Larman's book on how to assign responsibilities to objects. His book is one of the best ways to learn OO modeling.

When you say data modeling techniques, what are you referring to specifically ?

Take a look at this thread for legacy scenario : http://forums.objectsbydesign.com/s...ghlight=mapping

Bala

__________________
Sun Certified Developer for the Java 2 Platform
http://uml.zepho.com


Posted by Emmad on 11-19-2002 02:19 AM:

To be able to answer this question, one must determine the modeling stage; model intended users as well as the model depth.

For analysis level, many analysts are not familiar with modeling let alone OO modeling.

If the model is intended to be used to develop code, then you need to consider the application environment/type:

1 –If your application is a mainframe application written in Cobol, then whatever you model in a class diagrams will have little value for the developer.

2 – If you are building an application using OO tools, then, by all means use OO approaches.

In general classical data modeling rules are valid in many situations when representing persistent class diagrams for example. However, such techniques are limiting in situations where OO varies significantly from ERD, for example in cases of inheritance (as the previous contributor hinted) and non-persistent classes.

Aslo, OO models can convey more specification on the class diagram in representing certain things like associations than ERD can.


Posted by Scott Ambler on 12-17-2002 07:45 PM:

Objects and Data

I'm currently posting writings about objects and data at www.agiledata.org.

Posted essays currently include:
1. Intro to OO (for data professionals)
2. Intro to data modeling (for object professionals)
3. Database refactoring.
4. The Object/Relational impedance mismatch.

Work in progress:
1. Working with legacy data.

Soon to come:
1. Mapping objects to relational databases
2. Encapsulation strategies (e.g. persistence layers).

- Scott

__________________
Scott W. Ambler


Posted by SZ on 12-17-2002 11:49 PM:

EJB 2.0 and CMP

With the advent of EJB 2.0 and CMP, we think the days of hand-coding object-relational mappings are over. In fact, we believe that UML tools could become the primary development vehicle for expressing the relationships between entity beans and then automagically generating the XML descriptors for EJB 2.0 as well as the DDL for relational databases.

Let's understand this better: Is it possible that application developers will no longer need to directly code database logic (inserts, updates, transactions, etc.)? If this is so, then it is best for database developers to make the transition to an object perspective as soon as possible!

To understand EJB 2.0 and CMP - container-managed persistence - read the excellent article by Richard Monson-Haefel at IBM's developerworks: Read all about EJB 2.0.


Posted by Scott Ambler on 12-18-2002 01:05 PM:

Data & objects

There's a few things wrong with your logic:
1. Not everyone is doing EJB.
2. Most people that are doing EJB seem to be doing session-bean managed persistence for critical data access, not CMP.
3. BMP is still a valid option for many situations.
4. You still need someone with database skills as there is a relational database on the back end.

I do agree that all data professionals need a handle on object stuff, however, all object professionals should have a handle on data stuff as well. We need to cross the object-data divide (http://www.agiledata.org/essays/imp...pedanceMismatch).

I wrote the complex persistence material, as well as the process-related material, for Mastering EJB 2/e (www.ambysoft.com/masteringEJB.html) for anyone interested. Many of my thoughts on persistence issues will appear at www.agiledata.org soon.

- Scott

__________________
Scott W. Ambler


Posted by SZ on 12-22-2002 03:17 AM:

EJB 2.1 is fairly recent, having been released in August, 2002. Tools for EJB 2.1 are just appearing now and their adoption takes time. So there is a time lag until the full impact of CMP 2.0 will be felt. Project managers will be hard pressed to NOT adopt this technology once it takes off since hand-coding database calls will seem like writing assembler code.

Your observation ('2. Most people...') is based on the older EJB 1.1 specification which everybody agrees was insufficient to see the benefits of CMP.

Yes, there are hurdles to EJB 2.1 but the momentum is there. Just look at the number of downloads and popularity of JBoss. Marc Fleury, CEO of JBoss, has an excellent whitepaper entitled Why I Love EJB's which has some great quotes about CMP:

Well, today there is very little need to use your own database access code. This is another nail in the coffin of the retrograde servlet to jdbc designs.

The first version of the persistence, the 1.1 version, was seriously lacking in various critical aspects. The 2.0 version is however a blockbuster.

One of the interesting things we are seeing with CMP 2.0 is that everyone is dropping BMP for CMP... Today, almost no-one uses BMP anymore as the power of CMP is proven and working.

I do agree that database skills are important but, who knows, it may no longer be a relational database!

For some more excellent material on object-relational mapping, see chapters 12 and 13 of Martin Fowler's new book, Patterns of Enterprise Application Architecture. He has over 100 pages of detailed patterns on this topic.

See also Paul Reed's excellent book Developing Applications with Java and UML where he advocates strongly for the new CMP model in EJB 2.x, but also takes the time to compare and contrast with BMP using data-access objects. Chapter 9 of this book discusses mapping classes to relational tables and demonstrates how to use a UML tool to generate DDL for relational tables.


Posted by SZ on 12-23-2002 03:16 AM:

Inheritance in PostgreSQL

PostgreSQL supports a unique form of inheritance which I don't seem to find described in Fowler's object-relational mapping patterns in Patterns of Enterprise Application Architecture.

Am I missing something or is this pattern omitted?


Posted by ebengtso on 12-23-2002 10:16 AM:

there are good articles about that at www.therationaledge.com

They master it.

About EJB SZ, do you know if it will support complex queries?

thx


Posted by SZ on 12-23-2002 11:36 AM:

ebengtso do you have a specific reference (issue, article) from the Rational Edge that answers the PostgreSQL question?

In EJB 2.1, the EJB QL added some key functionality missing in EJB 2.0. See Richard Monson-Haefel's article about the new EJB QL features.


Posted by ebengtso on 12-23-2002 03:35 PM:

Sorry SZ, but i can't give some help with postgresql.

I can recomend you to read:
Automated Modeling of Legacy Systems Using the UML," The Rational Edge, September 2002.
www.therationaledge.com

Book: UML to database design
Addison Wesley

In my opinion, if i had a really good database physical design i would apply a Facade pattern (Create views in my database and expose that as my database interface. In my business components i would use the database interfaces to access data)

Hope i am right and can help you


Posted by Scott Ambler on 02-03-2003 09:57 PM:

You might find Why Data Models Shouldn't Drive Object Models (and Vice Versa) at http://www.agiledata.org/essays/drivingForces.html to be of interest.

You might also find www.agiledata.org/essays/mappingObjects.html useful too.

- Scott

__________________
Scott W. Ambler


Posted by daybyter on 03-26-2003 11:55 AM:

UML data modelling profile?

quote:
You might also find www.agiledata.org/essays/mappingObjects.html useful too.


Hi Scott,

I looked the 2nd article, and what confuses me a bit, is the fact, that you wrote your own data modelling profile?
What is wrong with this version: http://www.rational.com/products/whitepapers/437.jsp? I'm working on a SQL/DB module for ArgoUML and have used this profile so far, since I gave it the best chances to become a OMG standard (although Mr. Gornik did not confirm, that Rational wants to propose it).

TIA,
Andreas

PS: Is there a list of companies, that are working in the data modelling field, available?


Posted by Scott Ambler on 03-26-2003 01:23 PM:

I think that there are several issues with the Rational proposal:
1. It's not complete. Mine isn't either, but it's certainly a lot more along the road.
2. It's vendor specific. I suspect that the primary reason why it isn't complete is that they don't cover the items they can't implement right now. Also, do you really want to rely on a competing vendor for the definition of what you're doing?
3. It doesn't look like they're going to submit to the OMG any time soon. A couple of years ago I was working with them to flesh it out and the effort sort of petered out.
4. If you read mine closely, you'll see that it's pretty much a superset of the Rational proposal (why reinvent the wheel).

- Scott

__________________
Scott W. Ambler


All times are GMT. The time now is 04:12 AM. Pages (2): [1] 2 »
Show 15 posts from this thread on one page

Powered by: vBulletin Version 2.3.5
Copyright © Jelsoft Enterprises Limited 2000 - 2017.
Copyright ©1999-2005, Objects by Design, Inc.