Persistance: Best practise

Discussion in 'Java' started by Claus, Aug 29, 2008.

  1. Claus

    Claus Guest

    Hi all!

    Coming from Coldfusion I will now have to develop an application in
    jsp.

    Now I'd like your opinion on what to use for persistance in that
    specific case:

    The database knows of Somethings (I would call them objects, but this
    might mislead you because they aren't objects in OOP speaking) and
    Something-Definitions. Each record of a Something has n records in a
    definition table where Something-ID is matched with an Attribute-ID
    and a value (wich again may be the ID of a database record). Thus,
    each something may be described differently from the others. So it's
    mainly the IDs I have in the database relations and not tables with
    columns to display.

    How would you handle these data in your jsp application?

    Thanks in advance.
    Claus.
     
    Claus, Aug 29, 2008
    #1
    1. Advertising

  2. Claus <> wrote in news:ef09dee6-4bfd-
    :

    > Hi all!
    >
    > Coming from Coldfusion I will now have to develop an application in
    > jsp.
    >
    > Now I'd like your opinion on what to use for persistance in that
    > specific case:
    >
    > The database knows of Somethings (I would call them objects, but this
    > might mislead you because they aren't objects in OOP speaking) and
    > Something-Definitions. Each record of a Something has n records in a
    > definition table where Something-ID is matched with an Attribute-ID
    > and a value (wich again may be the ID of a database record). Thus,
    > each something may be described differently from the others. So it's
    > mainly the IDs I have in the database relations and not tables with
    > columns to display.
    >
    > How would you handle these data in your jsp application?
    >
    > Thanks in advance.
    > Claus.
    >


    If these Somethings still resemble and act like some Objects, meaning that
    they *could* be modeled as tables and columns, I would model them as Java
    beans (POJOs with getters and setters).

    jsp loves beans, no matter what the persistence model is.
     
    Donkey Hottie, Aug 29, 2008
    #2
    1. Advertising

  3. Claus

    Roedy Green Guest

    On Fri, 29 Aug 2008 04:11:40 -0700 (PDT), Claus
    <> wrote, quoted or indirectly
    quoted someone who said :

    >How would you handle these data in your jsp application?


    There are so many options. The decision depends mainly on how many of
    them you have and how fat they are. For small numbers you would use a
    collection and serialise it.

    For larger numbers you might use a POD or an SQL database.

    For high performance, you might concoct something custom, like a
    Hermit Crab.

    Look up the words POD, SQL, serializaton, Collection, hermit crab in
    the Java glossary.

    http://mindprod.com/jgloss/jgloss.html
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Aug 30, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. exquisitus
    Replies:
    0
    Views:
    494
    exquisitus
    Feb 20, 2005
  2. VisionSet
    Replies:
    0
    Views:
    853
    VisionSet
    Aug 19, 2003
  3. Rich

    Architecture best practise

    Rich, Jun 30, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    520
    Nick Malik [Microsoft]
    Jul 11, 2006
  4. Mat

    Video file - best practise

    Mat, Aug 14, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    355
    =?Utf-8?B?Y2xpY2tvbg==?=
    Aug 14, 2006
  5. Kenneth P. Turvey
    Replies:
    2
    Views:
    285
    Kenneth P. Turvey
    Oct 18, 2007
Loading...

Share This Page