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

  • SEARCH
  • Home
  • 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 3785726
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:34:22+00:00 2026-05-19T11:34:22+00:00

I’m trying to learn these relationships. Is it correct as I show below that:

  • 0

I’m trying to learn these relationships. Is it correct as I show below that:

1) I will have a 1:0..1 relation by simply making the identity key of the parent also the identity key of the child?

2) To make it 1:1, I add an FK in parent table, connecting the two Identity columns?

Is this all there is to it? And please correct me if my wording is not exact/correct.

1:0..1

Customer(Id {PK, Identity}, Name)

CustomerAddress(CustomerId {PK, FK, Identity}, StreetName)

FK_CustomerAddress_Customer(CustomerId, Id)

1:1

Customer(Id {PK, FK, Identity}, Name)

FK_Customer_CustomerAddress(Id, CustomerId)

CustomerAddress(CustomerId {PK, FK, Identity}, Streetname)

FK_CustomerAddress_Costumer(CustomerId, Id)


EDIT1:

I believe both above was wrong, and solution is like this: (?)

1:0..1

Customer(Id {PK, Identity}, Name)

CustomerAddress(CustomerId {PK, FK, UNIQUE}, StreetName)

FK_CustomerAddress_Customer(CustomerId, Id)

  • 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-19T11:34:22+00:00Added an answer on May 19, 2026 at 11:34 am

    A 1:1 relationship between two tables means that each tuple in each table maps to exactly one tuple in the other. This is more formally known as a Bijection. It’s a limitation of SQL that for most practical purposes bijection is effectively impossible to achieve in a SQL database. That’s because SQL requires each table to be updated individually and therefore there is no way to update two such tables unless you temporarily disable one of the constraints.

    A 1:0/1 relationship is also known as an Surjection (your first example). Surjection is the standard behaviour of a SQL-style “FOREIGN KEY” constraint assuming nulls are not permitted. The constraint is always optional on one side of the relationship.

    NOTE: The IDENTITY property isn’t relevant to your example. It’s the key and foreign key constraints that define the relationship.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.