Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

NX: Database questions

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a couple of questions on implementing the database portion of the project.
1.The instructions state that the user should be able to specify the location of the database. If the location specified does not contain a database file should I have the system create a db file with the header information and schema information but no records, or should I throw an error?
2.When the db server is initialized I parse the header information to verify the magic cookie. Other then this I do not read in any of the header or schema info. I have hard coded record length, field off sets, etc. in the code. From the instructions I feel like this is enough for the purpose of the certification. But if this was going to be a real app I would parse the header and schema info to build all my variables and settings. This means little if no change would be required if the db format changed assuming that the header and schema format were still specified in the same format as before. This would be a better design part for the db server but might be an overkill for the purpose of this project.
Any advice would be helpful, Thx.
reply
    Bookmark Topic Watch Topic
  • New Topic