Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > UML Questions > Data modelling vs object oriented modelling Thread Rating: 2 votes, 5.00 average.
Pages (2): [1] 2 »   Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
venkat
Junior Member

Registered: Sep 2002
Location: Bangalore
Posts: 18

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

Report this post to a moderator | IP: Logged

Old Post 09-27-2002 10:09 AM
venkat is offline Click Here to See the Profile for venkat Click here to Send venkat a Private Message Visit venkat's homepage! Find more posts by venkat Add venkat to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

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.

Report this post to a moderator | IP: Logged

Old Post 10-10-2002 02:42 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
bparanj
CTO, Zepho Systems

Registered: May 2002
Location: Raleigh, North Carolina
Posts: 277

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

Report this post to a moderator | IP: Logged

Old Post 10-11-2002 04:19 PM
bparanj is offline Click Here to See the Profile for bparanj Click here to Send bparanj a Private Message Visit bparanj's homepage! Find more posts by bparanj Add bparanj to your buddy list Edit/Delete Message Reply w/Quote
Emmad
Junior Member

Registered: Nov 2002
Location: Canada
Posts: 5

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.

Last edited by Emmad on 11-19-2002 at 07:15 PM

Report this post to a moderator | IP: Logged

Old Post 11-19-2002 02:19 AM
Emmad is offline Click Here to See the Profile for Emmad Find more posts by Emmad Add Emmad to your buddy list Edit/Delete Message Reply w/Quote
Scott Ambler
Senior Member

Registered: Dec 2002
Location: Just North of Toronto, Canada
Posts: 31

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

Report this post to a moderator | IP: Logged

Old Post 12-17-2002 07:45 PM
Scott Ambler is offline Click Here to See the Profile for Scott Ambler Click here to Send Scott Ambler a Private Message Visit Scott Ambler's homepage! Find more posts by Scott Ambler Add Scott Ambler to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

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.

Report this post to a moderator | IP: Logged

Old Post 12-17-2002 11:49 PM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
Scott Ambler
Senior Member

Registered: Dec 2002
Location: Just North of Toronto, Canada
Posts: 31

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

Report this post to a moderator | IP: Logged

Old Post 12-18-2002 01:05 PM
Scott Ambler is offline Click Here to See the Profile for Scott Ambler Click here to Send Scott Ambler a Private Message Visit Scott Ambler's homepage! Find more posts by Scott Ambler Add Scott Ambler to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

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.

Report this post to a moderator | IP: Logged

Old Post 12-22-2002 03:17 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

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?

Report this post to a moderator | IP: Logged

Old Post 12-23-2002 03:16 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
ebengtso
Junior Member

Registered: Nov 2002
Location:
Posts: 12

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

Report this post to a moderator | IP: Logged

Old Post 12-23-2002 10:16 AM
ebengtso is offline Click Here to See the Profile for ebengtso Click here to Send ebengtso a Private Message Find more posts by ebengtso Add ebengtso to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

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.

Report this post to a moderator | IP: Logged

Old Post 12-23-2002 11:36 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
ebengtso
Junior Member

Registered: Nov 2002
Location:
Posts: 12

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

Report this post to a moderator | IP: Logged

Old Post 12-23-2002 03:35 PM
ebengtso is offline Click Here to See the Profile for ebengtso Click here to Send ebengtso a Private Message Find more posts by ebengtso Add ebengtso to your buddy list Edit/Delete Message Reply w/Quote
Scott Ambler
Senior Member

Registered: Dec 2002
Location: Just North of Toronto, Canada
Posts: 31

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

Report this post to a moderator | IP: Logged

Old Post 02-03-2003 09:57 PM
Scott Ambler is offline Click Here to See the Profile for Scott Ambler Click here to Send Scott Ambler a Private Message Visit Scott Ambler's homepage! Find more posts by Scott Ambler Add Scott Ambler to your buddy list Edit/Delete Message Reply w/Quote
daybyter
Junior Member

Registered: Mar 2003
Location:
Posts: 3

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?

Report this post to a moderator | IP: Logged

Old Post 03-26-2003 11:55 AM
daybyter is offline Click Here to See the Profile for daybyter Click here to Send daybyter a Private Message Find more posts by daybyter Add daybyter to your buddy list Edit/Delete Message Reply w/Quote
Scott Ambler
Senior Member

Registered: Dec 2002
Location: Just North of Toronto, Canada
Posts: 31

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

Report this post to a moderator | IP: Logged

Old Post 03-26-2003 01:23 PM
Scott Ambler is offline Click Here to See the Profile for Scott Ambler Click here to Send Scott Ambler a Private Message Visit Scott Ambler's homepage! Find more posts by Scott Ambler Add Scott Ambler to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 11:10 PM. Post New Thread    Post A Reply
Pages (2): [1] 2 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

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