• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Field Name and Field Length

 
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?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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.
 
Ranch Foreman
Posts: 1905
13
  • 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.
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic