• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ERD- how to model entity in this database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic