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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:02:41+00:00 2026-05-25T12:02:41+00:00

I’m working on a type of inventory management application using the following mixture or

  • 0

I’m working on a type of inventory management application using the following mixture or technologies: MySql, C#, WPF, ADO.Net EntityFramework 4.

I’m a little confused as to how I should store the details on the sales/purchase invoices in the database.

This is how I had it before… I stored the details in a LongText field as an XML string.

+---------------------------------------------------+
| SalesInvoices                                     |
+---------------------------------------------------+
| int InvoiceID: primary key, auto-incretement      |
| int OrderID                                       |
| int CustomerID                                    |
| int CreatedByEmployeeID                           |
| DateTime Date                                     |
| DateTime? ShippingDate                            |
| LongText ItemsData (details, stored as XML)       |
| LongText TransactionData (details, stored as XML) |
| Double Subtotal                                   |
| Double Tax                                        |
| Double Freight                                    |
| Double FreightTax                                 |
| Double Total                                      |
+---------------------------------------------------+

However, I looked around on the web and most of the examples I’ve seen have a separate table SalesInvoiceDetails. So I’m wondering, is there something wrong with my approach, should I go through the trouble of switching over to the approach.

My Requirements: The search through the SalesInvoice table should be really fast. I do not need to search through the details of the invoice unless the user actually opens up an invoice, so It’s okay if the user has to wait a second or two over here.

The reason I chose my approach the first time was because I thought millions of details in one table will eventually make it really slow to open and I would have to worry about deleting and updating rows if a user decides to go back to change something. And I thought it would be a bit of a hassle to have sub items for detail lines and storing them as rows and keeping track of the parent/children relationship and etc.

So yea, I’m wondering is there any good reason why I should abandon my approach and make another table for the details.

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

    Why you think using separate table would be slow? I think you need to read(If you haven’t yet) about Database normalization, indexes and so on to get good performance. To update detail now you need to transfer and insert whole blob instead of, for example one price field.

    Also I found nice article here. I realy liked what author wrote(good point to abandon your approach):

    This isn’t a bad approach, since it records every purchase made by every customer. But what if you started to ask complicated questions, such as:

    How many 3" Red Freens did Freens R Us order in 2002?

    What are total sales of 56" Blue Freens in the state of Texas?

    What items were sold on July 14, 2003?

    That’s my opinion 🙂

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload

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.