Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX newbie question - extracting data from file

 
BillLeighton
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basic newbie overview question regarding the Contractor exam here...
Regarding getting the data from the Sun provided db file...
it sounds like I will need to use a FileChannel and ByteBuffer to extact the data from the db file. I assume that once the data is extracted, that "Contractor" objects should be created from this, and any manipulation of the data should be in the form of these Contractor objects? For RMI these objects would be serialized, but it looks like the requirements for the "local network" specifically states that you can't deal with serialization in any form.
Am I on the right track? Or am I over-complicating things by dealing with Contractor objects as opposed to directly manipulating a buffer or somesuch?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
I think you will be leaving serialization up to RMI. It will handle the details of serializing your Contractor object on the database side, and deserializing it to give your client a Contractor object. So from that point of view, your client will just be dealing with a Contractor object. Your client code should not have to worry about the fact that it came from some RMI methods, and that RMI may have serialized it along the way.
am I over-complicating things by dealing with Contractor objects as opposed to directly manipulating a buffer or somesuch?

It seems that a number of people here are working similar ways - creating an object that directly represents the data in the databse. And creating methods that also model the business requirements for the data.
The alternate way of working (also followed by quite a few people here) is to make the database a generic database, where you are dealing with "records" and "fields", and the database has no knowledge of what type of data is contained within the physical file. Naturally all methods are then generic database methods rather than being business methods.
Both choices have their good and bad points.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic