Click here to Skip to main content
15,898,732 members
Home / Discussions / Database
   

Database

 
GeneralRe: Flatten data (SQL) Pin
Wendelius10-Mar-11 7:24
mentorWendelius10-Mar-11 7:24 
AnswerRe: Flatten data (SQL) Pin
i.j.russell11-Mar-11 1:30
i.j.russell11-Mar-11 1:30 
GeneralRe: Flatten data (SQL) Pin
Lash2011-Mar-11 4:32
Lash2011-Mar-11 4:32 
QuestionReport Builder 3.0 Pin
kunthavai10-Mar-11 4:14
kunthavai10-Mar-11 4:14 
AnswerRe: Report Builder 3.0 Pin
Klaus-Werner Konrad16-Mar-11 8:32
Klaus-Werner Konrad16-Mar-11 8:32 
QuestionSQL Server 2005 Express Pin
arkiboys9-Mar-11 21:18
arkiboys9-Mar-11 21:18 
AnswerRe: SQL Server 2005 Express Pin
Wendelius9-Mar-11 22:32
mentorWendelius9-Mar-11 22:32 
QuestionA Matter Of Design Pin
Roger Wright9-Mar-11 16:21
professionalRoger Wright9-Mar-11 16:21 
I'm trying to monitor electric meter readings for several substations, and provide a database that can be used to analyze usage patterns. The meter readings are provided in csv format with the structure:

Date, MeterID, HE1, HE2, HE3,..., HE24, OffPeak, OnPeak, Total

where HEn is the hour ending MWh usage; I don't much care about the On/Off Peak values, or the totals.

I want to store the data in the form:

Date MeterID1 MeterID2 MeterID3 MeterID4
date HE1      HE1      HE1      HE1
date HE2      HE2      HE2      HE2
date ...      ...      ...      ...
date HE24     HE24     HE24     HE24


That's one approach, at least. But it creates a problem if we add another meter to the mix later. I'd have to recreate the table with a new schema, then repopulate it from the previous table.

Another way would be to create a separate table for each meter, using the same schema; that would make it easier to add new meters later with no manual operations, but it seems inefficient to me.

Worse still would be to use a single table date-meterID-HEn value. That would entail a huge number of records with little content, hardly a useful structure.

I'm sure this sort of problem happens all the time in other applications, and there must be some recommended solution, but I don't know of it. Can someone with more experience suggest a solution?
Will Rogers never met me.

AnswerRe: A Matter Of Design Pin
Jörgen Andersson9-Mar-11 19:13
professionalJörgen Andersson9-Mar-11 19:13 
AnswerRe: A Matter Of Design Pin
Mycroft Holmes9-Mar-11 22:13
professionalMycroft Holmes9-Mar-11 22:13 
AnswerRe: A Matter Of Design Pin
David Skelly9-Mar-11 22:30
David Skelly9-Mar-11 22:30 
AnswerRe: A Matter Of Design Pin
Tim Carmichael10-Mar-11 3:02
Tim Carmichael10-Mar-11 3:02 
AnswerRe: A Matter Of Design Pin
Wendelius10-Mar-11 6:05
mentorWendelius10-Mar-11 6:05 
Questioncompare two tables in different environments. Pin
vanikanc9-Mar-11 11:01
vanikanc9-Mar-11 11:01 
AnswerRe: compare two tables in different environments. Pin
Wendelius9-Mar-11 11:20
mentorWendelius9-Mar-11 11:20 
AnswerRe: compare two tables in different environments. Pin
Mycroft Holmes9-Mar-11 11:43
professionalMycroft Holmes9-Mar-11 11:43 
GeneralRe: compare two tables in different environments. Pin
vanikanc10-Mar-11 2:16
vanikanc10-Mar-11 2:16 
GeneralRe: compare two tables in different environments. Pin
vanikanc10-Mar-11 10:40
vanikanc10-Mar-11 10:40 
GeneralRe: compare two tables in different environments. Pin
Wendelius11-Mar-11 11:54
mentorWendelius11-Mar-11 11:54 
AnswerRe: compare two tables in different environments. Pin
dingoishere13-Mar-11 21:09
dingoishere13-Mar-11 21:09 
AnswerRe: compare two tables in different environments. Pin
Om Prakash Pant14-Mar-11 2:04
Om Prakash Pant14-Mar-11 2:04 
QuestionMaintaing DB Pin
Hum Dum8-Mar-11 23:45
Hum Dum8-Mar-11 23:45 
AnswerRe: Maintaing DB Pin
Wendelius9-Mar-11 0:20
mentorWendelius9-Mar-11 0:20 
GeneralRe: Maintaing DB Pin
Hum Dum9-Mar-11 0:41
Hum Dum9-Mar-11 0:41 
GeneralRe: Maintaing DB Pin
Wendelius9-Mar-11 0:55
mentorWendelius9-Mar-11 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.