• 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

B&S:Why Database Schema ?

 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,
I just got my assignment and started with the database design.Brainstorming with the requirements I have some initial thought.
  • Why the database file contains schema details,though requirement specification itself talks about the details in schema?
  • Can I use the schema details given in the database file to make application generic?The name in the schema field can be used as a table header,also the table can be scaled to n columns.
  • Do we need to validata a record data against the schema whenever we reads a record?

  • Any thoughts is much appreciated.
    [ August 09, 2007: Message edited by: Sanjeev Singh ]
     
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi

    I also have the assignment B&S.
    I haven't read a requirement about record format recognition at runtime.
    I will not care about DB fields or length changes.

    Even if it's a good idea, it's not expected and if you implement this you will add code complexity. There is a requirement about simplicity and clarity.
     
    Ranch Hand
    Posts: 145
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi ranchers,

    When i implement my databasemanager class i do everithing in this class, from readign the header, schema and data to construct my contractor objects; i see than i can separate database low level functionality and construct contractor objects and make this a bit more generic without sacrify code simplicity and later i found than it make my design more object oriented my code because each class generate have only one responsability (my databasemanager converted to transform contractor objects and an adittional helper than makes all my database operations). I see i can improve may initial thoughs when i see it works fine.

    Additionally when i made my helper i found than i can pass schema parameters in a more generic way, only databasemanager pass to helper what is the schema than wants read.

    I hope it helps you.
    [ August 09, 2007: Message edited by: Gabriel Vargas ]
     
    reply
      Bookmark Topic Watch Topic
    • New Topic