• 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
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

lookup tables vs interfaces

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys :

Me and my boss had an discussion about what the best way to force standards conformance is, java interfaces or lookup tables in a database. I put this in the orm category because ORM is basically a artifact that arises because of the difference in the object vs. relational paradigms. Any thoughts on this issue ? It seems like a never ending argument...
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its an argument I'm not sure I follow! What standards are you talking about, standards in the data model, or standards in the object model? Can you explain a bit more about this discussion?
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More concretely -- here is an example.

Say you have an application where 2 different classes create a certain abstract data type that is stored in a database for retrieval at a later data. Now, assume that the evem though models create the same data type, the contents of that data type are conceptually different (for example, they both create a byte array, and but each orders the bytes differently for some reason).

Now, in order to ensure interoperability between the data type across the two models, you can put a lookup table in the database that matches the creator of the orignal data type with the ordering of its byte array OR you can force each class to implement a method (call it getByteOrdering()) that describes the byte arrays ordering.

So there is a relational as well as an oo solution to the managing the difference between these two classes. Theoretically, does anybody have thoughts on what the "best practices" might be in such a situation ? A relational database can be used to store anything, but do you think its a good idea to store code oriented information in a relational database ?
Obviously, this is an open ended question...
 
reply
    Bookmark Topic Watch Topic
  • New Topic