Results 1 to 9 of 9
  1. #1
    mattlindsay is offline Member
    Join Date
    Apr 2011
    Posts
    8
    Rep Power
    0

    Question Relational Database or Object Database?

    As a new Java user, I am creating an application that needs a way of storing data. I am trying to produce my application in n-Tier (three in my case; presentation layer, application layer and data store layer). Traditionally I have used a relational database (such as MySQL or MS SQL) and then using application logic to translate that to object level.

    I have heard a little bit about "object persistence" through data stores such as Hibernate.

    Does anyone have any experience and/or advice on where to go with this? If I use a normal relational database, how do I write the Data Access Layer (DAL)?

    Advice and opinion please!!

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Hi
    I think you just confused. Hibernate is ORM tools. It offer relate POJOs in your code and tables in database.
    But there are some nosql database, which has performance like Objects.
    for example orientdb.com
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    mattlindsay is offline Member
    Join Date
    Apr 2011
    Posts
    8
    Rep Power
    0

    Default

    Thanks for your reply Petr,
    I think I must be confused, yes, but Im afraid I dont understand your answer well either. I'm not sure what Hibernate does now, or what a POJO is. Could you also explain what NoSQL is? Ive heard of NoSQL before but not sure what it is! Could you give any advice or examples?

    Many thanks

    Matt

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    If you feel like it, play with Intersystem's Jalapeno. They have a free version (at least they had it) and its amazingly fast. Jalapeno is part of "Cache", Intersystem's database system (they also have a SQL engine for the thing). I'm not related to Intersystem whatsoever, just a happy user.

    kind regards,

    Jos

    edit: I just checked the free "Cache" version still exists.
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by mattlindsay View Post
    Advice and opinion please!!
    why not using serialization for your problem?

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Quote Originally Posted by mattlindsay View Post
    Thanks for your reply Petr,
    I think I must be confused, yes, but Im afraid I dont understand your answer well either. I'm not sure what Hibernate does now, or what a POJO is. Could you also explain what NoSQL is? Ive heard of NoSQL before but not sure what it is! Could you give any advice or examples?

    Many thanks

    Matt
    In the good old days you had your database and Java, and they would talk via JDBC.

    Then people noticed they were tending to write an awful lot of code for mapping from the database tables into their java objects, so along came technologies like (spit) EJBs, which had objects which mapped to tables. These proved to be awfully clunky in their early versions, and required special classes for your business objects.

    Some bright spark decided this was bollocks, and we ought to be able to work with POJO (Plain Old Java Objects), so created a framework that allowed you to map these objects to database tables, and ways of managing all the persistence stuff for you. This framework was Hibernate.

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Tolls View Post
    In the good old days you had your database and Java, and they would talk via JDBC.

    Then people noticed they were tending to write an awful lot of code for mapping from the database tables into their java objects, so along came technologies like (spit) EJBs, which had objects which mapped to tables. These proved to be awfully clunky in their early versions, and required special classes for your business objects.

    Some bright spark decided this was bollocks, and we ought to be able to work with POJO (Plain Old Java Objects), so created a framework that allowed you to map these objects to database tables, and ways of managing all the persistence stuff for you. This framework was Hibernate.
    That's what that Jalapeno technique I mentioned is all about; the acronym is rather clumsy imho: JAva LAnguage PErsistence with NO mapping, but the technique is amazingly fast (as well as their entire database Cache. You're right about the enterprise beans, they were just yuck.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  8. #8
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    First you must define your aim. Simple JDBC is better solve for many project, but you need write many code and you can make many mistake. It's bad.
    Other solve you can use ORM tools, How I mention for example Hibernate. It relates your model (POJO) and table in database.
    POJO is stand Plain Old Java Object. It is class. which has not any logic in site.
    see Hibernate Mapping,Hibernate PoJO,Writing Java Object (POJO)
    Hibernate stores all data in database. if you compare to NoSQL it uses itself store.

    Many NoSQL stores can use hierarchic architect for performance data and it use already Java object without relate with store. as not like Hibernate It uses relate mapping (xml or annotations) for it.
    examples ObjectDatabase - orient - Object Database usage through Java APIs - NoSQL document database light, portable and fast. Supports ACID Tx, Indexes, asynch queries, SQL layer, clustering, etc - Google Project Hosting
    Skype: petrarsentev
    http://TrackStudio.com

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Array Object to Database
    By frankycool in forum New To Java
    Replies: 1
    Last Post: 11-16-2009, 12:42 PM
  2. Object Version Management with a Database
    By MiniMik in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 08-21-2009, 10:05 AM
  3. SPT Object Database 0.2.0
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-23-2008, 03:03 PM
  4. SPT Relational Database Web Tool 1.2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-10-2007, 07:40 PM
  5. SPT Relational Database Web Tool 1.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-16-2007, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •