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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:13:12+00:00 2026-05-26T12:13:12+00:00

Fairly new to database schema (plan to use SQLite). Having said that, I’m thinking

  • 0

Fairly new to database schema (plan to use SQLite). Having said that, I’m thinking about using surrogate keys because the database currently contains a compound key (3 columns), which shows up in most of my tables. I have several tables that contains 3 columns for the unique key and one column containing some information; I also have one table contains 3 column for unique key and the same 3 columns as foreign keys (many parents). Combining all these tables into a single table doesn’t seem to make sense because there would be many empty fields.

Any pit falls if I choose one or the other? Which one is generally considered more convenient for programming?

Thank you in advance.

  • 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-26T12:13:13+00:00Added an answer on May 26, 2026 at 12:13 pm

    Each technique has advantages and disadvantages.

    In general, it’s easier to write SQL statements and JOINs if you only need to refer to the single surrogate key column. It also reduces the size of your database fairly substantially.

    On the other hand, with surrogate keys you often find yourself having to add at least one extra table to your JOINs in order to retrieve information that is part of the surrogate key.

    Two additional advantages of a surrogate key:

    1. Many frameworks require the use of an integer primary key field.

    2. If you are binding your records to any kind of user interface control (inputs on a web page, for example), it’s considerably easier to attach a single value to the control for identification purposes than it is to encode and decode multiple columns.

    • 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 programming in WinForms, and have been using BindingSource, DataSet,
Fairly new to relational database and to sqlite. But I'm curious what's the best
Being fairly new to JavaScript, I'm unable to discern when to use each of
I fairly new to JQuery and perhaps trying to achieve something that might be
I am trying to map a new domain model to a fixed-schema legacy database
I'm fairly new to database programming in .NET. If I want to call several
Am fairly new to using MySQL and a total novice at Perl but am
I'm fairly new to database design, but I understand the fundamentals. I'm creating a
I am fairly new to the more advanced database features, such as functions, but
I am fairly new to StructureMap, but my understanding is that there are two

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.