Persistance: Best practise

C

Claus

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.
 
D

Donkey Hottie

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.
 
R

Roedy Green

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top