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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:56:50+00:00 2026-05-31T03:56:50+00:00

Currently our database is set up so that a payment transactions records a payment

  • 0

Currently our database is set up so that a payment transactions records a payment type ID, and this links to a payment type (cash, check, credit) table that contains these values. Example:

Payment Transaction:

  • ID
  • Amount
  • Date
  • Payment Type ID

Payment Type:

  • ID
  • Payment Type (Cash, Credit)

My question is whether or not I should just remove the payment type table, and just store the payment type value as text inside the payment transaction.

This is similar to this question. except with payment types it’s pretty certain that no new information will ever need to be add data per payment type. ‘Cash’ doesn’t link to anything, there’s nothing I need to know about Cash itself, it just is.

As far as I can tell the pros and cons would of replacing the payment type table with a single field would be:

Pros

  • Removes a mostly unnecessary join whenever the payment type needs to be found.
  • The payment type for a transaction will always accurately reflect what it was at the time the transaction was recorded. i.e. If I change the ‘Cash’ record in the payment types table to ‘Credit’ (for whatever reason), all payment transactions that link to Cash will now be linked to Credit.

Cons

  • Storing the payment type as a text field will slow down sorting by payment type, and make such a sort somewhat messier than it is now.
  • The payment type for a transaction will always accurately reflect what it was at the time the transaction was recorded. i.e. If I had a typo and the payment type was stored as ‘Kash’, I could easily fix that typo and all transactions that link to that payment type will automatically be updated.

I’m leaning towards removing the payment type table and adding the single field to the payment transaction table, what do you recommend would be the best course of action?

  • 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-31T03:56:51+00:00Added an answer on May 31, 2026 at 3:56 am

    I don’t agree with either of your pro arguments.

    Removes a mostly unnecessary join whenever the payment type needs to
    be found.

    There’s just your assumption that this will be a performance bottleneck. Denormalization is something you should do when you have data that says you must. This isn’t one of those times.

    The payment type for a transaction will always accurately reflect what
    it was at the time the transaction was recorded. i.e. If I change the
    ‘Cash’ record in the payment types table to ‘Credit’ (for whatever
    reason), all payment transactions that link to Cash will now be linked
    to Credit.

    You should not allow someone to modify the payment type this way. Changing the payment type should be another transaction, with its own timestamp.

    Any relational database can handle the JOIN and the normalized tables. You’re guilty of premature optimization, I fear.

    I’d spend less time worrying about this and more time thinking about how you’ll deal with history. How long will you keep transactions around before moving them out to a history table? Have you thought about partitioning your database by months according to timestamp? That would be more worthy of your efforts.

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

Sidebar

Related Questions

Our database is currently at 64 Gb and one of our apps started to
We have a SQL Server 2005 database, and currently all our users are connecting
We have an SQL 2005 database backend for our website, currently about 10GB in
In our current database development evironment we have automated build procceses check all the
Currently our website uses links to allow the user to change their locale. The
I am currently in the process of designing a database. I have a table
I'm currently in the process of testing our solution that has the whole gamut
We have a table and a set of procedures that are used for generating
The question says it all. Our application is currently authenticating users against a database.
All of our tables are currently set with a LATIN1 character set. A user

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.