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

Rationale of having magic cookie and schema descriptions in data file

 
Terence Lai
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My SCJD assignment instructions have already clearly stated the database schema and the details of each fields. I don't understand the purpose of having magic cookie and the schema descriptions in the database file. It seems to me that the information in the database file is redundant.

Now, my question is: What am I suppose to do with this redundant information? The only thing that I can think of is to implement validation logics on the database file again the specifications stated in the instructions. If the data file is do not follow the specificiations, I will abort the program and alert the user on the invalid database file.

Does anyone know the expectations of the exam markers in this area?
[ December 19, 2007: Message edited by: Terence Lai ]
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1st, for the magic cookie, consider the test case that SUN could try:

- try to open an invalid database file and see how your application reacts. You application should/could/must check the magic cookie to decide if it's a valid database file.

As for the field details, it falls into the "its a design choices" category. I read many people hard coded the value and passed. Others (like me) read it dynamically. Both cases, I think you need mention it in your design choices and explain why. It shows you thought about it and understand the consequences.

Regards,
Alex
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic