Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General question about table creation- Two tables or one?

Status
Not open for further replies.

emilybartholomew

Technical User
Aug 3, 2001
82
US
I was wondering if anyone could give me some general advice on this issue. I am creating a database to hold prices of electricity. The table I have so far is (basically) as follows:

Timestamp
Location
Price

However, these prices are given both by zone (geographical area) and by generator. Should I keep all these prices in ONE table (with fields Timestamp, Location_code, Price) or in TWO tables, to separate the zoanl and generator data?
 
Emily,

General DB design principle: build tables as 'tall and skinny' as possible. However, your application doesn't look like it will have millions of records - so combining the data into one table looks to be OK unless there is no relationship at all between 'Zone' and 'Generator' records.

ie don't worry to much here about 'proper design' - just use plain old common sense around how the data will be used and build your tables to best accomodate that.

HTH

EJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top