Re: When to avoid a data abstraction layer




"anon" <anon@xxxxxxxxxxxxxxxx> wrote:
If I'm writing a fairly simple desktop application, can somebody
suggest what a logical breakpoint is between writing my own classes to
get/set information in a relational database (such as a MySQL database
on the same machine) and using an abstraction layer like Hibernate?

Is there a super-simple data abstraction layer out there that I've
missed?

It seems like Hibernate would be overkill because it is just not
likely that data storage will change, so persistency through direct
manipulation doesn't sound that bad to me.

But I have a feeling I'm missing something. Maybe it is my
unfamiliarity with data abstraction layers that is holding me back.


It isn't so much that using an abstraction layer lets you change the backend
store easily; it's that it lets you avoid writing (and maintaining) a bunch
of 'bubblegum' code -- code that solves a problem that has been solved
before, and that is tedious, repetitious, and somewhat error-prone as a
result.

Of course, if you have a really simple app that really is about looking at a
few tables in a relational database and that needs to support a fair number
of different permutations of queries against that data, then direct to JDBC
is probably a better answer to the requirements.

IMHO, the breakpoint is how you perceive the database: is it the core of the
application, with your Java code merely presenting a pretty UI around it (in
which case you probably want to go to raw JDBC for maximum flexibility); or
is the database merely a back-end transactional store for sophisticated data
that is heavily manipulated by business rules expressed in Java (in which
case you probably want to use something like Hibernate)?


-- Adam Maass


.



Relevant Pages

  • Re: When to avoid a data abstraction layer
    ... get/set information in a relational database (such as a MySQL database ... Is there a super-simple data abstraction layer out there that I've ...
    (comp.lang.java.databases)
  • Re: Accuracer Database
    ... > If you want to be able to support different database sometime in the ... Abstract to make the app an n-tier app and make NexusDB the default ... Use Data Abstract's data abstraction layer to easily shift to ... other database server solutions as and when required. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: When to avoid a data abstraction layer
    ... get/set information in a relational database (such as a MySQL database ... Is there a super-simple data abstraction layer out there that I've ... It seems like Hibernate would be overkill because it is just not ...
    (comp.lang.java.databases)
  • Re: When to avoid a data abstraction layer
    ... get/set information in a relational database (such as a MySQL database ... Is there a super-simple data abstraction layer out there that I've ... It seems like Hibernate would be overkill because it is just not ...
    (comp.lang.java.databases)
  • Re: POD speed
    ... > consider use of such a POD product to be without disadvantages. ... Enforcement of database constraints in application code is one solution generally ... > application-private data into a relational database on the suspicion ...
    (comp.lang.java.databases)