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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:26:54+00:00 2026-05-29T10:26:54+00:00

Everything that isn’t labeled calc or finalvalue is raw data that I will be

  • 0

tables

Everything that isn’t labeled “calc” or “finalvalue” is raw data that I will be manipulating.

I finally know enough SQL to be able to create the necessary tables and perform the needed calculations. However, I just wanted to verify that there is no simpler way to do this, something that would involve fewer tables.

Would it be better to create views instead of actually altering the tables and inserting calculated columns? I don’t actually care about the calculated columns in Table1 and Table2 after I have the final data in Table3. SQL Server 2008.

I should also note that I will be receiving new raw data for Table1 and Table2 every day, and that I plan on appending these records and then appending my new Final Values to Table3 with a date field.

  • 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-29T10:26:55+00:00Added an answer on May 29, 2026 at 10:26 am

    Start here:
    http://support.microsoft.com/kb/283878

    You never want to store calculations directly in a table, the calculations will be done by the queries that generate your data. Table 3 is actually the results of a simple query.

    From what you have above, I would say you have at least the following three tables:

    Customers – contains basic customer data, one row per customer, and some kind of ID that you generate (probably an integer identity column is best, but can be anything you choose).

    Produce (or Products, if you have more than fruit and vegetables) – one row per product containing product information, some kind of ID that you generate (again, integer identity is the best).

    Sales – one row per transaction

    Here’s where things get a little tricky. You could have Sales and SalesItems where sales has a unique row for each transaction and SalesItems contains one row for each product that was purchased in the transaction, but for a really simple system as you appear to have above, you could just get away with a Sales table that has ProductID and CustomerID along with quantity and whatever else you want to store.

    EDIT: It’s a safe bet that a simple system will one day grow into a complicated system, so if I were designing the database I would probably go with separate tables for Sales and SalesItems to make the database more flexible and able to scale better.

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

Sidebar

Related Questions

Here is my code, that isn't working, don't know why: $sql = `INSERT INTO
using jquery ui 1.8 trying autocomplete Everything works apart from that the ui-menu isn't
How can I compare two NSArrays so that I can delete everything that isn't
Everything that I read about sockets in .NET says that the asynchronous pattern gives
Ok my application does everything that is it suppeded to do and it does
I have done everything that is on the web (i think) i have the
I was reading at an apple site that shark captures everything that is running
Is there any easy way to tell perl now ignore everything that is printed?
I am trying to include the library StringEscapeUtils and everything that I can find
Grails tends to write out the URL for everything that uses its tags as

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.