Home arrow static arrow Java Programming [Archive] - About the assignment -- database file
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - About the assignment -- database file
This topic has 3 replies on 1 page.

Posts:104
Registered: 12/1/03
About the assignment -- database file  
Jul 30, 2004 7:05 AM



 
Hi,
Can I ask a question about the assignment?
The specification said:
"First four bytes of the database file is the magic cookie value which identifies this as a database file."

The problem is do I need to consider what these four bytes equal to? Should I assume that all the valid database file will have the same four bytes at the start of the file?
 

Posts:21,718
Registered: 98-02-20
Re: About the assignment -- database file  
Jul 30, 2004 7:10 AM (reply 1 of 3)



 
Java .class files have a magic string at the start: "CAFE BABE".

I'm not sure if that's true of all database implementations. Sounds like it's true for your academic implementation.

%
 
Guest
Re: About the assignment -- database file  
Jul 30, 2004 7:29 AM (reply 2 of 3)



 
Hi,
Can I ask a question about the assignment?
The specification said:
"First four bytes of the database file is the magic
cookie value which identifies this as a database
file."

The problem is do I need to consider what these four
bytes equal to? Should I assume that all the valid
database file will have the same four bytes at the
start of the file?

no.

1) it depends on your database... it seems to me that most databases have bytes at the beginning of their data files which identify the file as (x) type of file... but how many bytes and what bytes are different for each database.

2) how the hell would we know.. you would have to look at the specs for the file more closely... it is possible that the first four bytes change depending on the usage status of the file... it is possible they never change.
 

Posts:104
Registered: 12/1/03
Re: About the assignment -- database file  
Jul 30, 2004 5:57 PM (reply 3 of 3)



 
Hi, I understand that no one should know about this........ but I really look very carefully in the spec..
I read that 20 times already, there's only 8 pages.... and I really can't see anything apart from "it's a magic cookie number" and nothing else....
I think I would assume the number won't change. Thx
 
This topic has 3 replies on 1 page.