P
Patti
I don't know if I should be asking this question in the
table structure section or forms design, but I'll start
here. I am in the process of creating a database for
energy sales and purchases. I currently have four tables
created:
TblCompany
CompanyID PK
CompanyName
TblScheduleType
SchedID PK
SchedName
TblTransaction
TransID PK
TransHourEnding (0100-2400 military time )
MW (# of megawatts per hour)
Price (price/mw)
Losses (MW loss per hour)
TblMasterTransaction
MtransID PK
MtransDate
MtransTag# (an identifier assigned to both
the purchasing and selling entities)
CompanyID FK
SchedID FK
TransID FK
My question(s) are regarding the 'Hour-ending' field.
1. I need to keep track of the total MW sold for
each hour, the company and the schedule type. The Load
Scheduler making the transaction is not going to want to
enter every hour for every transaction he makes each
day. It would be too time consuming. I know I'm jumping
ahead, but I'm visualizing a form that will have all the
hours listed for the day and the scheduler can just
cursor down to the hour(s) in question and enter the MW
and $$. Is this achievable, possibly through VB code?
2. If a transaction (or tag#) covers several hours
would it be necessary to have two fields instead of one:
beginning time and ending time? (All transactions are
for a full hour. no partial hours, so if 20 MW is sold
for hour-ending 02 through 04, the beginning time would
be 0200 and ending time would be 0400). However, the MW
or the price may not be the same for each of the hours in
question. Then each hour would have to be entered
separately, causing a duplication of transactionID??
Would I possibly need two primary keys, i.e. TransID and
hour??
3. with this design, will I be able to query for
each hour, for example hour-ending 0300.? Again, I need
to keep data separate for each hour, whether it be in a
table or via Visual Basic or whatever.
4. Do I need 2 separate transaction tables for sales and
one for purchases?
I have many other questions, but thought I'd start with
these. I first need to get the tables structured
properly. I hope I explained myself clearly. If not,
let me know. Thanks for any help you can give.
Patti
table structure section or forms design, but I'll start
here. I am in the process of creating a database for
energy sales and purchases. I currently have four tables
created:
TblCompany
CompanyID PK
CompanyName
TblScheduleType
SchedID PK
SchedName
TblTransaction
TransID PK
TransHourEnding (0100-2400 military time )
MW (# of megawatts per hour)
Price (price/mw)
Losses (MW loss per hour)
TblMasterTransaction
MtransID PK
MtransDate
MtransTag# (an identifier assigned to both
the purchasing and selling entities)
CompanyID FK
SchedID FK
TransID FK
My question(s) are regarding the 'Hour-ending' field.
1. I need to keep track of the total MW sold for
each hour, the company and the schedule type. The Load
Scheduler making the transaction is not going to want to
enter every hour for every transaction he makes each
day. It would be too time consuming. I know I'm jumping
ahead, but I'm visualizing a form that will have all the
hours listed for the day and the scheduler can just
cursor down to the hour(s) in question and enter the MW
and $$. Is this achievable, possibly through VB code?
2. If a transaction (or tag#) covers several hours
would it be necessary to have two fields instead of one:
beginning time and ending time? (All transactions are
for a full hour. no partial hours, so if 20 MW is sold
for hour-ending 02 through 04, the beginning time would
be 0200 and ending time would be 0400). However, the MW
or the price may not be the same for each of the hours in
question. Then each hour would have to be entered
separately, causing a duplication of transactionID??
Would I possibly need two primary keys, i.e. TransID and
hour??
3. with this design, will I be able to query for
each hour, for example hour-ending 0300.? Again, I need
to keep data separate for each hour, whether it be in a
table or via Visual Basic or whatever.
4. Do I need 2 separate transaction tables for sales and
one for purchases?
I have many other questions, but thought I'd start with
these. I first need to get the tables structured
properly. I hope I explained myself clearly. If not,
let me know. Thanks for any help you can give.
Patti