• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

ERD- how to model entity in this database

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone, I am building a small database for a sports club and I have some questions. I have an entity called employee but don't want to have subtypes becase there are no many different employees,only coach, psychologist and secretary. They have same atributes. The thing is, a coach as a subtype is in relation one to many with enttity called advanced qualifications and with entity training. How should I model database to have employees that are not subtypes? I know that one posibility is to have in eployees atribute that says employee_type, but if I do that, what will happen with training and advanced qualifications? I dont want to lose these entityes, specialy because training is connected to other importrant entities and qualifications is only to trainer and can not be to any other empolyee. I also thought about making a coach,secreatry and a psychologist as entities  and not subtypes and connect them with employees via identifying relation. I have tested this and for example when i do it, coach gets id  from employee, but as a foreign key and not primary. Is that right way to do it or there are some other possibilities?
Thank you for reading and I hope someone will have an idea !

I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic