Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2003
    Posts
    7

    Unanswered: database design from OO perspective ..HELP!!?

    So im having some trouble designing a database i want to use.
    here is an example of my object design
    [a] - abstract class
    int ID_NUMBER
    String NAME

    [a.1] extends [a] abstract class



    [a.2] extends [a] abstract class



    [b] extends [a.1] abstract class


    [c] extends [a.1] abstract class


    [d] extends [b]
    [e] extends [b]
    .
    .
    .
    [h] extends [b[

    so i have this tree type object design in which they all have an ID and a name... and ultaimatly a type .
    at first we had a table with a list of ID's names and "types" being some character that represented a type ( could possibly be looked up in some sort of a typeCode table") but since every object has a string of type associated with is it seems messy to store a bunch of tables just to m ap each object ( instance of) to its type..
    example
    u have a instance of type e... then u know its also of type b and not c as well as type a.1 and not a.2 ... is there a good source to look for as far as books or documentation to map these objects to database tables well?

  2. #2
    Join Date
    Mar 2003
    Location
    East Grinstead ,UK
    Posts
    19

    Re: database design from OO perspective ..HELP!!?

    Try using 'Beginning Java Databases'. However you don't necessarily need to map the java objects to mirror your relational database tables.
    What are you trying to do? Is this a personal project or for a commercial client?
    am328
    Originally posted by premesh
    So im having some trouble designing a database i want to use.
    here is an example of my object design
    [a] - abstract class
    int ID_NUMBER
    String NAME

    [a.1] extends [a] abstract class



    [a.2] extends [a] abstract class



    [b] extends [a.1] abstract class


    [c] extends [a.1] abstract class


    [d] extends [b]
    [e] extends [b]
    .
    .
    .
    [h] extends [b[

    so i have this tree type object design in which they all have an ID and a name... and ultaimatly a type .
    at first we had a table with a list of ID's names and "types" being some character that represented a type ( could possibly be looked up in some sort of a typeCode table") but since every object has a string of type associated with is it seems messy to store a bunch of tables just to m ap each object ( instance of) to its type..
    example
    u have a instance of type e... then u know its also of type b and not c as well as type a.1 and not a.2 ... is there a good source to look for as far as books or documentation to map these objects to database tables well?

  3. #3
    Join Date
    Mar 2003
    Posts
    7
    this is for a comercial client..

  4. #4
    Join Date
    Mar 2003
    Location
    East Grinstead ,UK
    Posts
    19
    Ok, you may not to mirror the relationship. What you need to is get the business rules first and then you create the classes. Can I ask what you're trying to do? For example are you trying to create a Java User interface so that the client can access or manipulate the data in the database?

    am328
    Originally posted by premesh
    this is for a comercial client..

  5. #5
    Join Date
    Mar 2003
    Posts
    7
    the clients wont access the date directly.. its bascially modeliong a theme park with reservable(class) and non reservable(class) entities. Each facility ( a class) has 1 to N reservable and non reservable entitiees. Each one of the reservable entities can be numerous things like.. shows, rides, walkups.. etc, so they are sub classes of the reservable type .. the same goes with the non reservable being of types resteraunts, shops, carts...etc. Then client then can look up informatino on any of these things or try to make reservations for the ones that are reservable to add to some sort od a plan... each on of the subclasses more or less have a specific thing about them to justify being seperate. the reservable and non reservable entities each have an id and the facility has an id.. makning the facility id and the reservable/non reservable ID pair unique to each item.

  6. #6
    Join Date
    Mar 2003
    Posts
    7
    u have aol?

  7. #7
    Join Date
    Mar 2003
    Location
    East Grinstead ,UK
    Posts
    19
    nope
    do you have MSN?
    Download MSN and then we can talk
    my email is mohammed_coleman@hotmail.com


    Originally posted by premesh
    u have aol?

  8. #8
    Join Date
    Mar 2003
    Posts
    7
    u dotn seem to be online
    ppurayil@hotmail.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •