472,143 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Creating the correct type of table

2
I need help to create a database for telecom circuits. Iím not sure of how to approach it. Hereís a brief description of what I need to create. Each circuit has a point A and a point B. The ports for each site would be either originate (ORG) or answer (ANS). The equipment used at point A and B is the same. For example, Site A Node, Card, Port (ORG) -- Site B Node, Card, Port (ANS). What would be the most efficient way to create table(s) for this? I've tried making one table with columns such as SiteA_Node, SiteA_Card, SiteA_port, SiteB_Node, SiteB_card, SiteB port. I've simplified it here, but when I made this I had something like 20 columns for Site A and 20 columns for site B. But this creates a huge table with basically duplicate columns. And the queries donít quite come out right. I've also tried creating a table like this: Site, Node, Card, Port, ORG/ANS; and just enter each end into its own row. But then I'm not sure how to combine the two rows to create an end-to-end circuit (which would be necessary for a report or display form), and make sure that I'm combining the correct data for Site A and Site B. Any help on this would be greatly appreciated. Thanks in advance.
Oct 14 '07 #1
2 1163
MMcCarthy
14,534 Expert Mod 8TB
See if the following structure solves your problem. The assumption made is that no two Nodes are the same.

tblCircuit
CircuitID (Primary Key)
CircuitName
SiteANode (foreign key referencing primary key of tblNodes)
SiteBNode (foreign key referencing primary key of tblNodes)

tblNodes
Node (Primary Key)
Card
Port
ORG/ANS
Oct 14 '07 #2
mckana
2
See if the following structure solves your problem. The assumption made is that no two Nodes are the same.

tblCircuit
CircuitID (Primary Key)
CircuitName
SiteANode (foreign key referencing primary key of tblNodes)
SiteBNode (foreign key referencing primary key of tblNodes)

tblNodes
Node (Primary Key)
Card
Port
ORG/ANS


Thanks, I'll try it. You're assumption is correct about no two nodes being the same.
Oct 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Kiran | last post: by
12 posts views Thread by Mats Lycken | last post: by
3 posts views Thread by DaveD | last post: by
3 posts views Thread by CanFlightSim | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.