1

Is it okay to live some tables not connected to anything?

I have a table with a set of discounts for deals. For each deal, discounts can be summed up, so I don't see the point in connecting the "deals" table and "discounts" table by discount id. I also can't just create INT field for a discount in the "deals" table because discount should be predefined in "discounts" table. How to better organize such database?

Here is the screenshot of the scheme of the DB I have came up with so far.

enter image description here

Same problem with services. Multiple services can be provided under one deal. Is there a type which can contain multiple strings or numbers?

closed as off-topic by Akina, MDCCL, McNets, LowlyDBA, Marcello Miorelli Jul 16 at 21:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Akina, MDCCL, McNets, LowlyDBA, Marcello Miorelli
If this question can be reworded to fit the rules in the help center, please edit the question.

  • For each deal, discounts can be summed up, so the relation between deals and discounts is M:N, and junction table with the structure of (deals_id, discounts_id), where each field is FK to according entity table, must exists. discount should be predefined in "discounts" table Impossible - entity instance cannot be self-referenced. – Akina Jul 16 at 12:17
  • @Akina Could you elaborate this answer? – Seeker001 Jul 16 at 12:19
  • Don't see the point. That's the basics. If you want, you can create self-answer. – Akina Jul 16 at 12:21
  • PS. The only chance when non-connected table makes sense seems to be a case when the table is a template table, and its record(s) is used to create a copy into entity table when new entity instance is created. – Akina Jul 16 at 12:23
  • 1
    Short answer: It is OK to have a table (or set of related tables) that are never JOINed to the other tables in a database. A "list of options" is an example of such. – Rick James Jul 16 at 14:19