Help - translating an extended class relationship into a database

Hi,

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)?

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.

Just to make things clear here is an ERD of my alternative solution.