473,887 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to store this type of data?

290 Contributor

I have a daily feed to update my database table with.

The feed contains this data:

Todays timestamp
Description (300 chars)
Daily Sales
Product Price
Product Cost

There are over 20,000 products in the update file every day.

95% of the products are already in the database from previous days but about 5% are new ones.

The Description does NOT usually change, but it can do and I have to record it, keeping the old description and the date of change.

So far, I have just been adding a row for each daily update, but this is wasting a lot of disk space because generally only two fields change (the timestamp and daily sales figure).

I am trying to work out a better way of doing it.

One thought is to check if there is any change to the Description, price etc and if there is not, just put a null in the field for that day. I assume that would save disk space ?

Maybe a better way is to have two tables that are joined.

Like this:

Todays timestamp
Description (300 chars)
Product Price
Product Cost


Todays timestamp
Daily Sales

It is going to make the searches that I do on the databases more complicated, but maybe this is better?

Any help would be appreciated
Dec 30 '09 #1
1 1446
40 New Member
What are these "Todays"? Why do you need them on both tables? Does it mean that you keep archive data of product information, i.e. what was price of a product at some todays, or what?
Dec 31 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Jenny | last post by:
Hi, I have a class foo which will construct some objects in my code. some of the objects store int values into the data deque, while others store float values to the deque. template <class TYPE> class foo { protected:
by: nzanella | last post by:
Hello, I am currently upgrading a database of products to include pictures to be displayed online. I would like to know whether it would be best to store the pictures themselves in a database as a BLOB or whether it would be best to simply store the filename. What are the pros and cons? Thank you,
by: Steve | last post by:
I developed a desktop app that reads an XML file into a dataset. (The desktop app has the XML schema built in, so it already knows what format the XML file should be in.) My problem is that I want the desktop app to get the same data from a web service. I have a prototype working where the XML data that was in the file is passed from the web service to the app as a string. The app then loads it into the dataset by using the
by: 42 | last post by:
Hi, Stupid question: I keep bumping into the desire to create classes and properties with the same name and the current favored naming conventions aren't automatically differentiating them... (both are "Pascal Case" with no leading or trailing qualifiers). For example... I'll be modelling something, e.g. a computer, and I'll
by: Tom | last post by:
I am planning on adding a Preferences form to my application and using the Property Grid to display the preferences to the user. What do you think would be the best way to save these preferences out to an XML file? Use the CAB (Configuration Application Block)? Save the preferences in a class object and serialize them out the the XML file? Write them out directly to the XML file? Other ways??? Just want to get some thoughts together......
by: Dave | last post by:
(My apologies for posting this on two forums. I have just found out the other one was the incorrect location) I am writing a VB.NET 2003 web application to operate on my company's intranet. It accesses data in an SQL Server database. I have developed a couple of pages that display data successfully. However, there is one area that I am having trouble getting a handle on, despite purchasing a couple of Wrox books. Up until now, I have...
by: David Isaac | last post by:
I have no experience with database applications. This database will likely hold only a few hundred items, including both textfiles and binary files. I would like a pure Python solution to the extent reasonable. Suggestions? Thank you, Alan Isaac
by: Tzanko | last post by:
As we all know, there is a 8060 bytes size limit on SQL Server rows. I have a table which requires a number of text fields (5 or 6). Each of these text fields should support a max of 4000 characters. We currently store the data in varchar columns, which worked fine untill our appetite for text fields increased to the current requirement of 5, 6 fields of 4000 characters size. I am given to review a design, which esentially suggests moving...
by: calvert4rent | last post by:
I need to some sort of data type that will hold a listing of ID's and their counts/frequency. As I do some processing I get an ID back which I need to store and keep an accurate count for how many times that ID is listed. For example I might get a listing of these numbers: 1,4,6,23,6,2,54,1,6,23,2,4,1,6 I will get those numbers one at a time and need to build something like 1,3
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but don't have any luck is to do a form validation. This script requires the files: db-file-to-disk.asp and _upload.asp. There is a DESCRIPTION field in the db-file-to-disk.asp file, what I want to do is the user has to field out this fied before...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.