I feel ashamed to say I am not very clear about the db-2*3.db file. This serves as a database file for sure, my question is, according to the instructions below:
Data file Format
The format of data in the database file is as follows:
Start of file
4 byte numeric, magic cookie value. Identifies this as a data file
2 byte numeric, number of fields in each record
Schema description section.
Repeated for each field in a record:
1 byte numeric, length in bytes of field name
n bytes (defined by previous entry), field name
1 byte numeric, field length in bytes
end of repeating block
Data section.
Repeat to end of file:
1 byte flag. 00 implies valid record, 0xFF implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information
End of file
All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes. All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII.
it seems like I am asked to write a parser, is it?

and, seeing this:
Database schema
The database that Bodgitt and Scarper uses contains the following fields: Field descriptive name Database field name Field length Detailed description
Subcontractor Name name 32 The name of the subcontractor this record relates to.
City location 64 The locality in which this contractor works
Types of work performed specialties 64 Comma separated list of types of work this contractor can perform.
Number of staff in organization size 6 The number of workers available when this record is booked
Hourly charge rate 8 Charge per hour for the subcontractor. This field includes the currency symbol
Customer holding this record owner 8 The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale.
instinctively I thought of SQL, but never did it with java...am I asked to build a DB engine with parser, compiler....?
I did a search in this board. Regarding DB, people were talking about magic cookie, RandomAccessFile and so on, well, my magic cookie is 0x00000203, but what to do with it?
And, I am not familiar with NIO, is there any more advanced substitution of the class RandomAccessFile in NIO?
Any reply/suggestion is highly appreciated.
Regards,
Ellen