Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 244097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:58:35+00:00 2026-05-11T20:58:35+00:00

Trust me, I’ve put a lot of thought into this problem before asking here,

  • 0

Trust me, I’ve put a lot of thought into this problem before asking here, and I think I got a solution, but I’d like to see what you guys can come up with before settling for my own 🙂

SCENARIO:

In the domain we got 3 entities: A treatment, a beautyshop and an employee. A beautyshop can hire 0 to many employees. Now, a beautysalon has a list of possible treatments it can do for its costumers. Each treatment has a description, a duration and a price. Each employee has a similar list, but each employee can specialize each treatment (different price or duration), add new treatments or “remove” treatments derived from the beautyshop.

.. This seems like a rather common problem to me, so I was hoping someone could come up with something clever 🙂

So far, Im thinking about letting each treatment have a unique id, and then let the employee list insert treatments by itself which will have the same id as the one from the shop. These employee treatments will then override the shop ones with the same id..

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:58:35+00:00Added an answer on May 11, 2026 at 8:58 pm

    Are We talking about the objective representation of the problem or about the database representation of the problem? If it’s the objective representation, than a specialized treatment should just be a subclass of the generic treatment.

    With the relational database representation of the problem, things get a bit harder:

    beautyshop ---= employee
    beautyshop ---= treatment_type
    treatment_type ---= treatment
    employee =--= treatment
    

    (---= is one to many, =--= is many to many).

    But how do We get a list of treatments available in a beautyshop? We don’t. Instead We get a list of treatments available from all beautyshop employees. That said, if a beautyshop has 0 employees, it serves no treatments.

    You might use null fields in treatment table to indicate that the particular employee serves this treatment with default properties. If the treatment_type’s defaults change for particular beautyshop, then all treatments are updated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've looked around a lot (trust me :) before posting this questions and I'm
I am looking to set full trust for a single web part, is this
This will require a little setup. Trust me that this is for a good
I got a asp.net portal lanching a 3.5 sp1 partial trust XBAP. The portal
.NET 4.0 don't use medium trust it got a different kind of security, does
I've got a Silverlight 4 OOB elevated trust app. I am trying to debug
Never trust the input. But it is also true for the character encoding? Is
I have a site using a self-signed cert (which prompts for trust this site
I am trying to run a process in my terminal but I don't trust
I'm sure this can't be too hard; but I'm struggling. The error is Exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.