Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, I might get flamed for not answering your question directly but I'm going to say it anyway because I think it's something you should consider. I don't have experience with NOSQL databases so I can't recommend one but as far as relational databases go there might be a better design for your situation.</p> <p>First of all - drop the 1 table per customer. Instead, I would architect a many to many schema in which there would be the following tables:</p> <ul> <li>Customers</li> <li>MeasurementTypes</li> <li>Measurements</li> </ul> <p>The Customers table will contain customer information, and a unique CustomerID field:</p> <pre><code> CustomerID | CustomerName | ..and other fields --------------------------------------------------------------------- </code></pre> <p>The MeasurementTypes table would describe each type of measurement that you support, and assign a unique name (the MeasurementType field) to refer to it:</p> <pre><code> MeasurementType | Description | ..and other pertinent fields --------------------------------------------------------------------- </code></pre> <p>The Measurements table is where all the data is aggregated. You would have one record for each data point collected, stamped with the customer id, the measurement type, a time stamp, and a unique "batch" identifier (to be able to group data points from each measurement together) - and of course the measurement value. If you need different types of values for your measurements you may need to get a little creative with the design but most likely the measurement values can all be represented by a single data type.</p> <pre><code> Customer | MeasurementBatch | MeasurementType | Timestamp | Value | -------------------------------------------------------------------------------- 1 | {GUID} | 'WIND_SPEED' | ... | ... -------------------------------------------------------------------------------- | | | | | </code></pre> <p>This way, you can have a very flexible design that would allow you to add as many data points for each customer independently from other customers. And you get the benefits of relational databases..</p> <p>If your SQL engine supports this feature you could even partition the Measurements table by the customer column.</p> <p>Hope this helps..</p> <p><strong>EDIT</strong></p> <p>I must mention that I'm not in any way affiliated with Microsoft nor am I trying to give them free advertising - it just so happens I'm most familiar with their SQL server.</p> <p>Based on Alan's comment - regarding whether a SQL database can support a data volume of a few thousand million records per year with the possibility of growing up to a billion records per year - there is a nice summary of limitations/specs for MS SQL server available here:</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms143432.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms143432.aspx</a></p> <p>It seems that the only limitation to how many records you can have per table is the available size on disk (and probably RAM if you're going to want to run certain reports on that data). </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload