• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Field Name and Field Length

 
John Mhenry
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two, two byte sections in the Schema that have every field encapsulated in a 'field name' and a 'field length'.
When I look at 'Denny's Dvd' source it appears like these are not referenced anywhere.

Denny's Dvd class has a final 'RECORD_LENGTH' which has no 'field name' or 'field length' separators.
Is Denny's DVD database completely different than the test?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are difference between the database of Denny's DVD and the one used in the actual assignment. There are even differences in database schema and interface methods between the different versions of an assignment.
 
Himai Minh
Ranch Hand
Posts: 1360
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Mhenry wrote:There are two, two byte sections in the Schema that have every field encapsulated in a 'field name' and a 'field length'.
When I look at 'Denny's Dvd' source it appears like these are not referenced anywhere.

Denny's Dvd class has a final 'RECORD_LENGTH' which has no 'field name' or 'field length' separators.
Is Denny's DVD database completely different than the test?


Denny's Dvd records start from location 0 in the database file.
But in my assignment , the first 70 bytes are for the meta data:
4 bytes for magic cookie (location 0-3)
4 bytes for offset (location 4-7)
4 bytes for number of fields
2 bytes for field length
4 bytes for name
4 bytes for location .....

The record starts from location 70.
Try to read your database file from location 0 and see what it prints out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic