• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SCJD Problem with data structure

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

Thanks for a great forum. I did SCJP 5.0 last year and now am interested in SCJD. I bought the voucher and was given the assignment. I started reading it and mid-way I found a problem with understanding some of the english. My assignment is of URLyBird and it was clearly written by more than one person as it is fairly easy to understand 90%, while impossible to understand the other 10%; namely "Data file format" and "Database Schema" sections.

The English just doesn't make sense! I just cannot proceed with the assignment until I understand how the datafile is formatted.

What I was going to do is just paste the 2 paragraphs in question and maybe someone can help me understand them, but first I want to ask, can I do this? Can I post from the assignment?

Thanks all and sorry for a silly thing but honestly I showed it to like 5 other people including 3 developer friends of mine, and its just too hard to understand these 2 silly paragraphs

Oh well thanks once again
X
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe Roberto's Database File Reader might help you when you have trouble understanding the data structure. You'll can find the link (beside a lot of other valuable information for a SCJD starter) in the ScjdFaq.

Good luck!
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it's the same as mine (which it probably is), I found the Database schema section intelligible once I realised that basically it's a table, with each entry in the table run together so each row becomes a single line. Work out where the end of each column is, and it all makes sense!

The Data file format section is a bit similar, in that all the right information is there, there just hasn't been any attempt to make coherent sentences out of it. Just read each little bit separately.
 
Clinton Magro
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did manage to understand the Database Schema, and I also understood how the datafile is structured in terms of records, however the first line of the datafile just doesn't add up!

I know there must be a unique 4 bit number which they called a magic cookie but what's the rest?

PartOfFile.png
[Thumbnail for PartOfFile.png]
Part of DB File opened with Notepad++
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you understand (like you say) the database structure and schema, you'll be able to write a little program which reads the database file, using a RandomAccessFile (or a DataInputStream). That's what I did first too. The database file is not plain text. If you are not able to write that program, Roberto's Database File Reader will be a great help.
 
Clinton Magro
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hehe finally found the code! Was kinda expecting a jar file .. silly me!
I will check it out properly and will post my results!

Thanks all
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic