Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • I have to make sure that there are no illogical data Does the below illogical situations are complete list of possible illogicals? if not then expand the illogical data situations list. Cat carrier cannot be in two boxes at once unique by (carrier, box). Cat cannot be in a carrier and cat box separately Unique (cat). Commented May 16, 2024 at 12:41
  • @Akina Thanks for the edit, I do not know why th tables were bad. I have also specified the conditions of illogical situations. Commented May 16, 2024 at 13:30
  • I do not know why th tables were bad. Empty line between text and table is compulsory. Commented May 16, 2024 at 13:37
  • I have also specified the conditions of illogical situations. First 3 conditions can be combined to "cannot exist 2 rows with the same cat" which needs in one unique (cat). Last 3 conditions can be implemented with according 2-column unique constraints. E.g. for condition 4 this will be unique by (carrier, box). Commented May 16, 2024 at 13:40
  • @Macok FWIW, this single table is denormalized and not a good way to manage data from an integrity standpoint. Why do you feel the need to use a single joined table instead of the separately normalized tables? Commented May 16, 2024 at 14:19