473,770 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB Structure Advice - lots of measurements in DB or file refs?

A project I'm thinking about, could use some advice from those who
understand the dimensional limits of an SQL-like DB.

Imagine, for example, a database containing detailed data for many
cities during thunderstorms. Each time there is a storm, data
collection begins, gathering "rain-drops-per millisecond" maybe 5 times
per second (don't worry about the sanity of this, its just an analogy).

The logistical data is no concern for me (cities, dates, storm duration
etc). I anticipate a few hundred cities and but also thousands of storm
events associated with those various cities.

However the storage of rain storm data is my question.

Should "rain-drop-rate" data be fields in a rain-drop-rate measurements
table, with columns of "rate-drop-rate" and a "storm event" foreign key
for the storm to which the event belongs? That seems like it would be
a poor use of DB resources, as there would be billions of entries in
that table after many hundreds or thousands of storms are captured.

The alternatives that come to mind are

a) each storm event has a file reference, and the file contains
thousands of pairs of time and rain-drop-rate. Then I have directories
full of files.

b) each storm event is a new table in the database with the columns of
"rain-drop-rate" and "time of measurement" (The database still gets
filled with billions of entries, but spread among thousands of tables)

Is there some other option I should consider? It seems like a is the
right answer but your input is appreciated...

Ross.
Jul 7 '08 #1
3 1691
RgeeK (Ro**@no.thanks .spammers) writes:
Imagine, for example, a database containing detailed data for many
cities during thunderstorms. Each time there is a storm, data
collection begins, gathering "rain-drops-per millisecond" maybe 5 times
per second (don't worry about the sanity of this, its just an analogy).

The logistical data is no concern for me (cities, dates, storm duration
etc). I anticipate a few hundred cities and but also thousands of storm
events associated with those various cities.

However the storage of rain storm data is my question.

Should "rain-drop-rate" data be fields in a rain-drop-rate measurements
table, with columns of "rate-drop-rate" and a "storm event" foreign key
for the storm to which the event belongs? That seems like it would be
a poor use of DB resources, as there would be billions of entries in
that table after many hundreds or thousands of storms are captured.

The alternatives that come to mind are

a) each storm event has a file reference, and the file contains
thousands of pairs of time and rain-drop-rate. Then I have directories
full of files.

b) each storm event is a new table in the database with the columns of
"rain-drop-rate" and "time of measurement" (The database still gets
filled with billions of entries, but spread among thousands of tables)

Is there some other option I should consider? It seems like a is the
right answer but your input is appreciated...
Since we don't know the real business problem and what you will use
the data for, it's difficult to say.

But your desciption reminds me of the problem the racing team McLaren
faced. They implemented, together with people from Conchango, a solution
where used the new Filestream feature in SQL 2008. You can read about
it on
http://www.microsoft.com/casestudies...yid=4000001476

McLaren wanted to work with their data from Excel, why the Filestream
solution suited them well. If you want to run SELECT queries against the
data, this is less practical. Your logical model should certainly be
(storm event, raim-drop-rate, time-of-measurement), but there are some
alternatives to organise it. SQL Server offers to partitioning solutions:
partition views available already in SQL 2000 and in all editions, and
partitioned tables, added in SQL 2005, and available only in Enterprise
Edition.

Partitioned tables are more solid, but both solutions permit you to
add and drop partitions as needed. Partitioned tables can have up 999
partitions if memory serves, whereas partitioned views has a limit of
256 tables.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 7 '08 #2
>Is there some other option I should consider? <<

Kx (http://kx.com/) and Streambase (http://www.streambase.com/); they
were designed from the ground up for capturing this kind of moving
data streams and have been in use for years.
Jul 8 '08 #3
Thanks for the suggestions. Happy to see the words "billions of
records" in there.

--CELKO-- wrote:
>>Is there some other option I should consider? <<

Kx (http://kx.com/) and Streambase (http://www.streambase.com/); they
were designed from the ground up for capturing this kind of moving
data streams and have been in use for years.
Jul 10 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1726
by: Olivier Parisy | last post by:
Hi all, I am new to Python (I just finished Guido's tutorial). I was very surprised to learn there that the StopIteration is used to end for loops in a standard iterator setting. I come from C++, where the use of exceptions as control structures is frowned upon for efficiency reasons. What is the Python canon on this topic ? Are exceptions
5
4535
by: Jeff | last post by:
I've created a beast! Here is my data structure: $VAR1 = 'bunkers'; $VAR2 = { 'items' => , \ ] }; $VAR3 = 'simpsons'; $VAR4 = {
25
3390
by: Tom Leylan | last post by:
Help :-) I can't see how this should be laid out! Consider the scenario of a car rental company. They have "cars" and "lots" (nationwide) and "customers." So far it is easy to query each of these. A car is rented by a customer so there would be say a "rentals" table. A car is rented and returned over and over so there would be many rentals for each car. One thing to remember is that the car isn't assigned to a specific lot so...
5
1738
by: Steve_CA | last post by:
Hello all, I've been recruited to assist in diagnosing and fixing a performance problem on an application we have running on SQL Server 7. The application itself is third party software, so we can't get at the source code. It's a Client Management system, where consultants all over the country track their client meetings, results, action plans, etc. , and has apparently been problematic for a long time now. I came into this...
7
1711
by: June Moore | last post by:
Hi all, I have a printout of a barcode label with various sections of info, e.g. sender, receiver, product details, notes... etc. I am currently designing a page which must look exactly like the this label when printed. The problem in HTML is that the table layout cannot be adjusted to the exact size that I would have liked it to be, and this causes a lot of frustration indeed. I need advice from people in this group on how I can solve...
3
2417
by: dlesandrini | last post by:
I need advice about my decision to go with Replication in general. This post was placed on the Microsoft Replication newsgroup, but I really value the feedback that comes from this group as well. I have a new client who want their Excel data moved to Access. They have only 4-6 users of this data and a couple of them want to work disconnected, with their laptops and synchronize when they come into the office. The database will be...
10
2314
by: ranjeet.gupta | last post by:
Dear All !! Before i qoute my querry, I will like to qoute my analysis and my Knowledge Struct a { int raw; char data; };
24
2286
by: Joseph Geretz | last post by:
Up to this point, our application has been using Windows File Sharing to transfer files to and from our application document repository. This approach does not lend itself toward a secure environment and so we are in the process of imposing a WebService gateway between our application client and the repository. (As a starting point, the WebService won't be a richly featured application server; business rules are still implemented in the...
3
3425
by: John Nagle | last post by:
Are weak refs slower than strong refs? I've been considering making the "parent" links in BeautifulSoup into weak refs, so the trees will release immediately when they're no longer needed. In general, all links back towards the root of a tree should be weak refs; this breaks the loops that give reference counting trouble. John Nagle
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10254
Oralloy
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...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9904
tracyyun
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...
0
6710
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();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
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.