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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:38:04+00:00 2026-05-15T11:38:04+00:00

Based on the information I have provided below, can you give me your opinion

  • 0

Based on the information I have provided below, can you give me your opinion on whether its a good idea to denormalize separate tables into one table which holds different types of contracts?.. What are the pro’s/con’s?.. Has anyone attempted this before?.. Banking systems use a CIF (Customer Information File) [master] where customers may have different types of accounts, CD’s, mortgages, etc. and use transaction codes[types] but do they store them in one table?

I have separate tables for Loans, Purchases & Sales transactions. Rows from each of these tables are joined to their corresponding customer in the following manner:

customer.pk_id SERIAL = loan.fk_id      INTEGER; 
                      = purchase.fk_id  INTEGER; 
                      = sale.fk_id      INTEGER;  

Since there are so many common properties among these tables, which revolves around the same merchandise being: pawned, bought and sold, I experimented by consolidating them into one table called “Contracts” and added the following column:

Contracts.Type char(1) {L=Loan, P=Purchase, S=Sale}

Scenario:

A customer initially pawns merchandise, makes a couple of interest payments, then decides he wants to sell the merchandise to the pawnshop, who then places merchandise in Inventory and eventually sells it to another customer.

I designed a generic table where for example:

Contracts.Capital DECIMAL(7,2) 

in a loan contract it holds the pawn principal amount, in a purchase holds the purchase price, in a sale holds sale price.

Is this design a good idea or should I keep them separate?

  • 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-15T11:38:05+00:00Added an answer on May 15, 2026 at 11:38 am

    Your table second design is better, and, is “normalised”.

    You first design was the denormalised one!

    You are basiclly following a database design/modelling pattern known as “subtype/supertype”
    for dealing with things like transactions where there is a lot of common data and some data specific to each tranasaction type.

    There are two accepted ways to model this. If the the variable data is minimal you hold everthing in a single table with the transaction type specfic attributes held in “nullable” columns. (Which is essentially your case and you have done the correct thing!).

    The other case is where the “uncommon” data varies wildly depending on transaction type in which case you have a table which holds all the “common” attributes, and a table for each type which holds the “uncommon” attributes for that “type”.

    However while “LOAN”, “PURCHASE” and “SALE” are valid as transactions. I think Inventory is a different entity and should have a table on its own. Essentially “LOAN” wll add to inventory transaction, “PURCHASE” wll change of inventory status to Saleable and “SALE” wll remove the item from inventory (or change status to sold). Once an item is added to inventory only its status should change (its still a widget, violin or whatever).

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

Sidebar

Related Questions

I have implemented an audit trail framework based on the information provided by the
I have a Windows.Forms based .NET desktop application that stores privileged information in a
I have a database that can have different types of relatinships based upon what
I have the following code (snips provided below) in my base class for handling
I have a base class called Panel, where some information about a window is
I'm asked to get the information based on a specific ID( here 406f-871b-a3ee71f7038) ,
I am trying to route a message based on information in a XML snippet
My script puts together a set of htaccess rules based on information passed into
I'm working on a C# XNA project that requires me to display information based
I'm trying to modify the decimal-format of a stylesheet based on certain information of

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.