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 8513207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:29:37+00:00 2026-06-11T04:29:37+00:00

I have made a small database for a daycare centre. I have been reading

  • 0

I have made a small database for a daycare centre. I have been reading up on identifying and non-identifying relationships and am still a bit confused about the whole thing. I have been using MySQL Workbench to design the database.

Now, the criterias for parents and children are that a Parent can have one or more Children and vice versa – ergo, the relationship between Parents and Children is a many-to-many. The best praktice to solve this (as I understand) is to make a third table – Parets_Children and use that as a “connection” between the other two:

Parents - 1:n - Parents_Children n:1 - Children

Now the issue I have is wether or not to use an identifying relationship here. The logic is that no child can exist without a parent and the parents wouldn’t be members of the daycare unless they had at least one child there. Neither of them would exist “alone”. However, when letting MysQL WB sorting it out for me, it creates a non-identifying relationship (I think).
Very simplified code:

CREATE TABLE 'parents' (
  'id_parents' SMALLINT UNSIGNED NOT NULL ,
  'name' VARCHAR(48) NOT NULL ,
  PRIMARY KEY ('id_parents');

CREATE TABLE 'parents_children' (
  'id_parents' SMALLINT UNSIGNED NOT NULL ,
  'id_children' SMALLINT UNSIGNED NOT NULL ,
  PRIMARY KEY ('id_parents', 'id_children') ,
  FOREIGN KEY ('id_parents') REFERENCES 'parents' ('id_parents' )
  FOREIGN KEY ('id_children' ) REFERENCES 'children' ('id_children' );

CREATE TABLE 'children' (
  'id_children' SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,
  'name' VARCHAR(48) NOT NULL ,
  PRIMARY KEY ('id_children');

Would this output be sufficient to reach the desired function? Have I misunderstood the whole relationship thing? I hope my question isn’t too obsqure.

  • 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-06-11T04:29:39+00:00Added an answer on June 11, 2026 at 4:29 am

    From the schema you provided I can see that the Foreign Key Constraint exists on table parents_children, which will ensure that the link between parent and child can only exist if both parent and child exists.

    This does not however stop you from inserting an entry into parents, without an accompanying entry in parents_children or for that matter children.

    So in short, this schema allows for a parent to exist, without a child.

    The problem with your logic here would be that both the parent and child needs to be created before the relationship can be created in parents_children (due to the foreign key relationships). However, the additional logic that you are looking for (no child no parent and vice versa) would require all a link between parent and child before a parent or child can be created.

    You see the chicken/egg problem here?

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

Sidebar

Related Questions

I have made a small SQL database to hold some information about students. I
I have a small self made gallery which im still working on it: http://springbreak.enteratenorte.com
I have made a small log service that i want to publish to a
I have made a small application in Java and I would like to make
Problem: Have made a small mail program which works perfectly on my developer pc
i have made a small opengl program using the d programming language. what i
Post-release, I have made one small change to one form in our development site
I have made a rediculasly small snippet to make a sub-header stick to the
I have just started programming and have made a few small applications in C
I have made an update on Google App Engine with a small fix and

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.