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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:14:24+00:00 2026-06-13T21:14:24+00:00

I am fairly new to database design, for many to many relationship, what is

  • 0

I am fairly new to database design, for many to many relationship, what is the differences and implications of creating a composite key and a unique id for e.g.

Country table

CountryID
CountryName

Language table

LanguageID
LangugageName

Many to Many table – using composite:

CountryID  Pkey
LanguageID Pkey

OR

Using unique Id:

AutoID Pkey
CountryID 
LanguageID 
  • 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-13T21:14:25+00:00Added an answer on June 13, 2026 at 9:14 pm

    Composite Key :

    A composite key is a combination of more than one column to identify a unique row in a table.
    composite key can be a primary key .

    PRIMARY KEY

    The PRIMARY KEY constraint uniquely identifies each record in a database table.

    so its all depend on your requirement

    in first design

    Many to Many Table:
    Using composite:
    CountryID  Pkey
    LanguageID Pkey
    

    if you use this desing than CountryID and LanguageID is composite primary key.i.e here

    data of the table will be

    CountryId  LaguageID
      1           1 //valid
      1           2 //valid
      1           3 //valid
      1           1//not valid data as its form composite primary key
    

    and in second design

    Using Unique Id:
    AutoID Pkey
    CountryID 
    LanguageID 
    

    AutoID is become primary key so this will allow data lke thsi

    AutoId    CountryId  LaguageID
     1          1           1 //valid
     2          1           2 //valid
     3          1           3 //valid
     4          1           1 //valid as AutoID is primary key
     1          2           3 // invalid as AutoID is prinary key
    

    hope this presentation help you to understand difference

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

Sidebar

Related Questions

I'm fairly new to database design, but I understand the fundamentals. I'm creating a
I'm fairly new to database programming in WinForms, and have been using BindingSource, DataSet,
So I am fairly new to android programming. I have a database and I
I'm on a fairly new project where we're still modifying the design of our
I'm fairly new on a project and ran across an interesting design paradigm for
I am fairly new to database programming and am trying to get a basic
I'm fairly new to database programming in .NET. If I want to call several
I'm fairly new to node.js and am trying to ping my mysql database to
Fairly new to database schema (plan to use SQLite). Having said that, I'm thinking
I'm fairly new at creating custom unobtrusive validation, and am running into a weird

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.