MarkATrombley, your idea seems quite easy to implement/validate for this requirement.
I kinda also had an other requirement that popped into my mind after I read your excellent proposition. Sorry if I forgot to add it to my first post.
There can also be LAG or etherchannel interfaces. For the one of you who have no idea what it is, it is a logical interface that bundles 1 to x number of physical interfaces together on the same network element to improve bandwidth or redundancy. As you may have noticed, I included "1" as a possible number of bundled interface. This is because we often deploy a single physical interface in a LAG configuration. This setup offers no advantage over a regular physical interface in terms of bandwidth and redundancy but it will facilitate the future addition of other planned physical interfaces in the bundle when required.
Now, a physical interface can only be connected once to an other physical interface of an other NE. After that, we can bundle 1 or more physical interfaces together into a logical LAG interface. After that, LAG interfaces of 2 different NE are also connected together.
That said, The LAG to LAG interfaces connections can be deducted from the physical connections because 2 physical interfaces that are part of a LAG group can only be on the same NE. The interfaces bundled in the LAG group can't usually be splitted between different NE. But, I do have the requirement to be able to connect it to different NE's.
I know some of you that are not too experienced with networking may find this setup a bit weird but it is definitely possible for special purpose.
I'll try to show here what I mean :
Code:
NE #1 NE #2
|------------| |----------------------|
| | | |
| |-|-Phys-Int1 ----------------- Phys-Int1-|-| |
| LAG #1 <-| | | |-> LAG #1 |
| |-|-Phys-Int2 ----------------- Phys-Int2-|-| |
| | | |
| |-|-Phys-Int3 ----------------- Phys-Int3-|-Can be LAG or not... |
| LAG #2 <-| | | |
| |-|-Phys-Int4 |----------------------|
| | \
|------------| \
\ NE #3
\ |----------------------|
\ | |
Phys-Int1-|-Can be LAG or not... |
| |
|----------------------|
Using your idea of an other column it solves the physical connection issue. I would then add an other column to save the related LAG group ID which is only a number.
Parsing this with SQL combined to Programming code would be quite easy I think.
Your feedback on my logic would be appreciated.
Pat Phelan, Your proposition seems to be a little hard for the beginner in me to understand. Please don't be vexed because I am just limited by my knowledge so it has nothing to do with your idea. That said, I would still like to try to understand your idea that may change a bit with what I added in this post. If you could provide a small diagram (but feel free to do it or not) it would make my brain switch to the next level.
The reason I still want to dig into your idea too even if the one I've represented here seems to make sense to me is that I realized recently, and I must say that I'm still at the bottom of the learning curve, that good DB design + good SQL queries saves you hundreds, no tons, no millions !!! of codding lines in your applications.
So I will probably pick the best option that I can understand which will saves me time in coding according to my knowledge level.
Thanks to both of you for your precious help.
Robert.