Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2007

    Help - translating an extended class relationship into a database


    I'm been working on a personal project to practice some of my Java and Database skills.

    Its a simple application which will allow me to collect and maintain information on all the different applications I have running.

    Take a look at the attached ERD and hopefully it will all make sense.
    For example an application(Environment) may have a database which will have db server connection details and also frequent queries that I would run.

    My issue is with the similar entities i.e. DataBase and SSH entities (pretty much the same entity) and the DBServer and SSHServer (contain common fields).

    With my class diagram I have rolled together all the common features into abstract class's and then I extend these to create more specific objects (to make use of polymorphism).

    Should this translate straight to the database, should I roll all these similar entities into one generic table with all the columns and maybe an additional 'type' column (so I could add a check constraint that says:
    if type='DBSERVER' then driver cannot be null)?
    Ive also attached an ERD of what this might look like - See ServerERD1.jpg.

    It seems cleaner to me to leave it as it is, but I would be interested to hear what you have to say.

    Thanks in advance.
    Attached Thumbnails Attached Thumbnails serverERD.JPG   serverERD1.JPG  

Posting Permissions

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