• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ERD- how to model entity in this database

 
Greenhorn
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 !

 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic