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

SCJD Problem with data structure

 
Clinton Magro
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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
 
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
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!
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • 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
  • 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: 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
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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic