If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > New Database Relationship problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-20-05, 14:46
dweinar dweinar is offline
Registered User
 
Join Date: Sep 2005
Posts: 2
New Database Relationship problems

I am trying to design a database that would help track the daily supply of natural gas on multiple contracts. Each contract has a supply side and a delivery side which are equal in volume (when fuel is taken into account). My problem begins with the fact that each contract has a different capacity. That capacity is a total of the capacities of each point on the contract. Some points are on multiple contracts so they have different capacities on different contracts. I can’t figure out how to setup the relationships in order to make this database successful. Any hints?
Reply With Quote
  #2 (permalink)  
Old 09-21-05, 11:56
ByteRyder52 ByteRyder52 is offline
Registered User
 
Join Date: Feb 2005
Location: Colorado Springs
Posts: 222
Preparing an ERD should be useful. What are the entities. You mention each "point" on the contract - is a "point" an entity? Would the contract then be composed of sets of these "points" in a 1:M relationship fashion?

Just some thoughts to get the ball rolling.
Reply With Quote
  #3 (permalink)  
Old 09-21-05, 16:20
dweinar dweinar is offline
Registered User
 
Join Date: Sep 2005
Posts: 2
The problem I am having is in the relationships. I'm not sure how to go about getting everything started. Let me explain a little better. We have multiple contracts that allow us to schedule the delivery of natural gas to customers. On each contract there are certain points that we can get gas supplied to us from (i.e. the station X processing plant). That point that we get the gas from as a certain maximum capacity. This is complicated by the fact that the volume of gas being supplied from station X can be coming to us from more than one supplier. In addition, point x could be on contract 1 with a max capacity of 100 and on contract 2 with a max capacity of 200. Would I need to have a table for each contract with the max capaicty at that point on that contract listed? If that is the case how do I handle the fact that we can have gas coming from point a via supplier D and supplier E?
I appreciate your help. I know I'm close, just can get over the hump.
Reply With Quote
  #4 (permalink)  
Old 09-21-05, 17:24
ByteRyder52 ByteRyder52 is offline
Registered User
 
Join Date: Feb 2005
Location: Colorado Springs
Posts: 222
And I assume it is possible that a supplier could provide gas at more than one station? Two possibilities come to mind.

Option 1
Contract (ContractID (pk), other relevant fields)
Source (ContractID (fk), StationID (fk), SupplierID (fk), Volume)
Station (StationID(pk),other relevant fields)
Supplier(SupplierID(pk), other relevant fields).

Option 2
Contract(ContractID(pk), other relevant fields)
Source(ContractID(pk), StationID(fk), Supplier, Volume, other relevant fields about the contract-station relationship)
Station(StationID(pk), other relevant fields about the station)

In both examples, Source is a relationship table that embodies the 1:M relationship between contract and stations. In some applications, additional relevant information may be included in the relationship table - hence the relationship can have attributes.

Does something along these lines get the job done?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On