473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Need help with building database

I am writing a database to keep track of Network Equipment.
Table Equip_1
ID,Node,Card,Slot,Port,Channel
Table Equip_2
ID,Card,Port
Table Equip_3
ID,Shelf,Card,Port
As you can see no piece of equipment is the same.
They all connect to DSX panels
Table DSX
ID,RR,Shelf,Port

then connections are made between the equipment by crosswiring from one
DSX to another.
Equip_1:1,1,1,5,1,1 -> DSX:1,303.03,15,3 -> DSX:2,303.03,17,22 ->
Equip_2:1,1,1

I am having trouble figuring out how to design this relationship. I
want to be able to pull up information in the following manner:

Look at Equip X and see what is connected to it
Look at DSX ###.## Shelf # and see what is connected to it
Look at the connections between Equip X and Equip Y
Look at the connections between DSX ###.## Shelf # and Dsx ###.## SHelf
#
etc

I have tried putting the dsx info in the same table as the equip since
the connection between the equip and it's own dsx will never change but
can figure out haw to connect the tables from there.

I have tried making a new table call crossdsx which shows what connects
to what but the fact that each equipment has different fields makes it
not work.

Possible connections could be
a-b,a-c,b-c,a-a,b-b,c-c

Please help, any advice is appreciated.

Nov 13 '05 #1
1 1286
so you have 3 types of equipment, so you could use one table with an
'equipment type' field
tblEquipment
equipmentID autonumber
equipmentType (ie. 1, 2, 3)
Node (1)
Card (1) (2) (3)
Slot (1)
Port (1) (2) (3)
Channel (1)
shelf (3)

tblDSX
dsxID
RR
shelf
port

so in tblEquipment we have 2 rows of data

equipmentID 7 9 (can be anything)
equipmentType 1 2
Node 1
Card 1 1
Slot 5 1
Port 1
Channel 1
shelf

and tblDSX has 2 rows
dsxID 1 2
RR 303.03 303.03
shelf 15 17
port 3 22

so now we can have many pieces equipment connected to many DSX's, so we
need another table

tblDsxEquipment, with 2 rows of data
dsxId 1 2
equipmentId 7 9
dsxCrossWireId 2 1

so now we have equipment (7) wired to dsx (1), crosswired to dsx (2)
wired to equipment (9)
and to answer your queries (air-code)

Look at Equip X and see what is connected to it
select b.equipmentId
from tblDsxEquipment as a INNER JOIN tblDsxEquipment as b on
a.dsxCrossWireId = b.dsxId
where a.equipmentId = 7

Look at DSX ###.## Shelf # and see what is connected to it
select a.equipmentId
from tblDsxEquipment as a inner join tblDsx as b on a.dsxId =
b.dsxId
where b.RR = 303.03 and b.shelf = 15

Look at the connections between Equip X and Equip Y
select b.equipmentId
from tblDsxEquipment as a INNER JOIN tblDsxEquipment as b on
a.dsxCrossWireId = b.dsxId
where a.equipmentId = 7 and b.equipmentId = 9

Look at the connections between DSX ###.## Shelf # and Dsx ###.## SHelf

select a.equipmentId , b.equipmentId
from tblDsxEquipment as a inner join tblDsx as b on a.dsxId =
b.dsxId
where b.RR = 303.03 and b.shelf = 15 and a.RR = 303.03 and a.shelf
= 17

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: new_GUY | last post by:
I have a HUGE project (at least for me) and need some guidance. I am trying to create a database for a local university movie club that allows users to input there basic personal information...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
7
by: cider123 | last post by:
I'm coding a project using the following article as reference: http://www.codeproject.com/csharp/DynamicPluginManager.asp In this type of project, plugins are loaded dynamically into a Plugin...
3
by: B Maxey | last post by:
I am storing images in a database and need a way to browse those files. I can load the files into an image list or whatever the control needs, but I need a control. It doesn't seem that any of...
14
by: Nick Z. | last post by:
I have a file that I want to read a UTF-16 unicode string from. What is the easiest way to accomplish that? Thanks in advance, Nick Z.
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
7
by: John Paul | last post by:
I'm thinking of building an e-commerce site in php. Anyone got any advice in building one? What is the best way to implement a payment system? Are any legal issues involved? Thanks,
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
7
by: digimotif | last post by:
All, I'm currently working with a small development company on a PHP application they already have. There are several processing tasks that could be scripted in Python and run in the background...
2
by: troled1 | last post by:
I hace3 a script that needs to write to a mysql database after pulling records from an ACCESS database. The select there are three loops, one outer loop gets the region, the next gets each building...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.