Hi, Im a little confused about the database part. I have read the data from the file using raf. Do i save this to a vector and then just use this vector for all my operations, ignoring the db file from there on, or do i need to update the actual db file via the vector ie GUI<->vector<->bd file. Any suggestions on how to implement this would be welcome. Thanks.
hi Kevin: You can do it either way, it depends on you data access design. If you choose to cach the database record in memory, i.e. using collections, you cannot ignore the database file. You need to update the database accordingly. So you have to make sure that what you have in memory cach is what you have in the file, this is called data integrity. [ June 06, 2004: Message edited by: Hanna Habashy ]
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
kevin mc cusker
Joined: Jun 06, 2004
cheers hannah, when two clients load the data to a collection, one updates the db file, then the other client has out of date information. Should i have the collection on the server, with everyone using that to search etc? Also, is it ok to have each record as one large string or should i divide the record into for example, name, address etc?
Joined: Aug 20, 2003
Kevin: These are design choices that you have to make, and then explain in your written exam. All these options are valid options, it is up to you to choose one. I will tell you what I did myself, but this is just my choice. I don't cach the data, instead I access the database file every time data is required. I keep a static collection to control the lock mechanism. I read about many diffrent interesting designs in this forum, and all of them are valid ones.