Originally posted by voostind


You don't? Or are you kidding?

Method 1:
- Connect to the database
- Execute a standard selection query
- Retrieve a record, store it in an object
- Use the object in code

Method 2:
- Connect to the database
- Execute a selection to get the XML record
- Retrieve the record
- Parse the XML (yuk!)
- Store the record in an object
- Use the object in code

Which do you prefer?

Note that method 2 isn't even correct, because you should still execute the original query as well to make sure the duplicated XML record isn't invalid.

Vincent
Oh, there is an original table of data? In that case, storing objects would be very stupid as that would be double storage, a big no-no for databases. However, storing objects directly in the DB don't seem so bad besides the XML parsing involved. Unless you need to execute SELECT queries and the like with WHERE contions on anything else than the ID - then you are screwed, I guess.

I guess my original proposed solutiuon was better, then.

As a sidenot, I've heard that there are databases that can store objects directly - has anyone used or know of these things?