Database structure : How to design the track system of a railway station
Dear Oracle experts,
I'm interested in your opinion about a database design problem.
I want to design a database which describes e.g. the tracks of trains in
a big railway station with many switches. What I always know is the position of every switch in my railway station.
If I know all of the present switch-positions I know automatically where a train which is at a certain position would move.
In my database I would like to store these pathways and search the pathway of train at a certain position and the present switch positions.
One problem is that if one of the switches is at a position which leads to a pathway which would the train drive round the next switch the position of the next switch would be uninteresting. Since I have to search the table with my pathways with my set of switch positions I willl have to put datasets for all positions of the circumscribed switch
into my table.
Exampel :
I have 3 switches. If switch 1 is at position 1 switch 2 is circumscribed and the train drives to switch 3. If switch 1 is on position 2 the train drives to switch 2. If switch 2 could have 10 positions then I would have to create datasets for all the 10 positions of switch 2 for all positions of switch 1 although these positions are not always interesting.
To solve this problem I would like to describe some kind of search tree in my database structure. Does someone of you have an idea how to solve this problem ?
Best ragards,
Daniel
Hirachical is interesting, but you pay a big performance/feature penalty by using it.
If this is a real train station, then changes probably won't be done on the tracks for a long time, and if so, it's a rare event that your program may not need to be able to handle dynamically?
If that, then your DB becomes simple ... have a table of tracks coming into the station, and another list of tracks going out. Maybe also "destination tracks" within your station.
Then simply have a table that takes a source/destination pair of tracks, and then a column for each switch. The column holds the setting of the switch to provide the path between source and destination.
Then you have a simple and fast query access. It's rather easy to turn the table for reporting if you want a more dynamic query access; but I guess your main need for the system is to ask "what do my switches need to be set at if a train needs to go from point A to point B". If so, a simple table layout as above is going to be your solution. And it's going to be fast and efficient.
Only if you dynamically want to be able to design the track layout does this become a harder problem. But you could still use the same "construct":
Table: Destination Pairs
PairID Number
FromTrack Number references tracks
ToTrack Number references tracks
Table: Switch settings
SwitchID Number references Switches
PairID number references Destination Pairs
SwitchSetting number
primary key: SwitchID, PairID
Now your query is a join - but it's possible to simply list all the switch settings on a given pair. No need for hirachical queries.
Similar Messages
-
How to design the URL?i know that the Google will take down the good URL.such as the staticize URL Google will like more..
A site's URL structure should be as simple as possible. Consider organizing your content so that URLs are constructed logically and in a manner that is most intelligible to humans (when possible, readable words rather than long ID numbers). For example, if you're searching for information about aviation, a URL like http://en.wikipedia.org/wiki/Aviation will help you decide whether to click that link. A URL like http://www.example.com/index.php?id_sezione=360&sid=3a5ebc944f41daa6f849f730f1, is much less appealing to users.
Consider using punctuation in your URLs. The URL http://www.example.com/green-dress.html is much more useful to us than http://www.example.com/greendress.html. Google recommends that you use hyphens (-) instead of underscores (_) in your URLs.
Overly complex URLs, especially those containing multiple parameters, can cause a problems for crawlers by creating unnecessarily high numbers of URLs that point to identical or similar content on your site. As a result, Googlebot may consume much more bandwidth than necessary, or may be unable to completely index all the content on your site. -
How to verify the Source systems connectivity with BWQ System.
Hi All,
I have diff source systems. And my requirement is to check the source systems connectivity with BWQ (BW Quality sys). please any body tell me the steps how to check the source system connectivity ?
Thanks & Regards,
ManjuHi Manjula,
If you encounter problems when establishing a connection to your target server, check the following:
A message box appears while performing one of the following actions:
Setting connection by choosing Apply to local session.
Testing connection settings by choosing Test settings.
Creating SAP TSQL objects
If errors occurred, they are displayed in the respective message box.
Check developer trace files in ST11.
Test connection:
For RFC related errors, check the RFC connection via SM59
For database multi-connect errors, check if you can connect to the target SQL Server with the SQL Server Query Analyzer. Also check if the DBCON entries are correct.
Regards,
RK -
How to install elance Tracker System on archlinux?
Hi guys, anobody here knows how to install elance Tracking system on archlinux,
Elance only provide rpm and deb packages,
I tried to use rmp2targz and deb2targz, but don't work, I also checked this video:
http://www.youtube.com/watch?v=XirJietlTfI
and it worked, bit I get an error saying that I need to install adobe air, but I already have installed
can anybody please tell how to install this package??
the package can be found at:
https://www.elance.com/php/tracker/main/trackerDownload (must be logged in on elance),
I uploaded the packages to mediafire if you want to check them out:
deb package
http://www.mediafire.com/?ad9x1h19m8kvomi
rpm
http://www.mediafire.com/?gshoa6cu4odcrt3
I did a PKGBUILD:
pkgname=elance-tracker-system
pkgver=current
pkgrel=2
pkgdesc="Elance tracking system"
arch=('i686')
url="https://elance.com/"
license=('unknown')
depends=('libidn')
makedepends=('rpmextract')
options=('emptydirs')
source=("TrackerSetup.rpm")
md5sums=('356798ce170a942e0fbb3ed5e6243e65')
build() {
cd "$pkgdir"
rpmextract.sh ../TrackerSetup.rpm
and it works, but when I try to run Tracker, it says:
This application requires a version of Adobe AIR which cannot be found.
Please download the latest version of the runtime from
http://www.adobe.com/go/getair,
or contact the application author for an updated version.
Notice that I already have installed adobe-air and adobe-air-sdk
kind regards.
thanks
Last edited by pahko (2012-05-23 04:20:28)adamrehard wrote:Could you please post both your PKGBUILD and the error message concerning Adobe Air?
Sure, thanks, I update the post, but here you have:
PKGBUILD
pkgname=elance-tracker-system
pkgver=current
pkgrel=2
pkgdesc="Elance tracking system"
arch=('i686')
url="https://elance.com/"
license=('unknown')
depends=('libidn')
makedepends=('rpmextract')
options=('emptydirs')
source=("TrackerSetup.rpm")
md5sums=('356798ce170a942e0fbb3ed5e6243e65')
build() {
cd "$pkgdir"
rpmextract.sh ../TrackerSetup.rpm
the error:
This application requires a version of Adobe AIR which cannot be found.
Please download the latest version of the runtime from
http://www.adobe.com/go/getair,
or contact the application author for an updated version.
Notice that I already have installed adobe-air and adobe-air-sdk
Last edited by pahko (2012-05-23 04:20:14) -
How to design the report?
Hi,
how to change the filling data in report by vertical way?
for eg: i am creating a group (group by userId) and displaying user name and access rights info;
User Name Access Rights
TestUser Adminuser
TempUser NotanAdminuser
but i want in this format
UserName TestUser TempUser
AccessRights Adminuser NotAnAdminuser
how to design the report?i haven't tried using cross tab.
but my requirement is like...
Modified User Name ........ TestUser Thendral till 'n' number of users
Total NO of Patients..........10 5
Heart Failure...........5 1
Surgical..................1 2
Pneumonia 3 1
Chest Pain 1 1
till 15 rows
How to achieve this using crosstab? -
How to create the Business System both sender and receiver in SAP XI / PI
Dear All
kindly let me know how to create the Business System both sender and receiver in SAP XI / PI
Regards
BlueHi,
If by any chance you are not able to find these....
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/workingwithSystemLandscapeDirectory+%28SLD%29&
http://help.sap.com/saphelp_nw04s/helpdata/en/24/8fa93e08503614e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/f1/92b248db68409487661ff13239127d/content.htm
Regds,
Pinangshuk. -
My Ipod touch has been stolen. The tracker shows it to be in a front garden of a road nearby. But it is not there. How accurate is the tracker deviceand should I report it to the police please?
The iPod touch does not have GPS, so the location accuracy is greatly reduced. It relies on the known location of nearby WiFi networks. As WiFi networks can extend for 100m or so, the iPod could be anywhere within a 100m radius of whichever WiFi router it is connected to.
-
How to assign the source system to the virtual provider
Hi
How to assign the source system to the custom virtual provider with services in BW 3.5 ?
Regards
PWnukHi PWnuk,
Refer this link on how to implement a virtual provider with services.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4752ec2d-0a01-0010-ecb0-a145cf2e3e92
Hope this helps
Regards
Karthik -
How to configure the Business Systems & Technical Systems into PI 7.0
Dear All
Kindly let me know how to configure the Business Systems and Technical Systems into PI 7.0
any word document/PDF would be very helpful.
Regards
BlueHi ,
You have to do the configure/creation of the Business Systems & Technical Systems in SLD.Generally this is maintained by Basis team in the Project.If you are looking to learn how to create BS and TS in SLD
You can find some useful information here on SLD concepts and creation of SLD
http://wiki.sdn.sap.com/wiki/display/XI/WorkingwithSystemLandscapeDirectory+%28SLD%29
Please refer this document for more understanding of SLD
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b00462bb-b7a0-2a10-8da6-f6b89834f8b4?quicklink=index&overridelayout=true
Regards,
Srinivas -
How to Run the NEW "System Info Command" in Tiger ?????
I am new to Applescript and was wondering if someone could help me on how to run the new "System Info Command"?
Thanks!!!The "system info" command that red_menace uses above is the new system info command that's mentioned on the web page you referenced. However, red's example only displays the "long user name" and the "AppleScript version" in the dialog.
The entire system info record actually contains all of these items, each of which you can access just like red_menace shows you in his example:
AppleScript version
AppleScript Studio version
system version
short user name
long user name
user ID
user locale
home directory
boot volume
computer name
host name
IPv4 address
primary Ethernet address
CPU type
CPU speed
physical memory
Steve
PS - if you switch Script Editor over so the bottom pane displays the "Event Log" you'll see the entire system info record displayed in the log when you run red_menace's script. -
I just tried to reset my iPad...then couldn't reset it. I don't know how to install the operating system on it again
Is this how you reset?
1. Hold the Sleep and Home button down (together)
2. For about 10 seconds
3. Until you see the Apple logo (very important)
4. Ignore the red slider -
HOW to reset the windows system on my macbook?
I WANNA TO KNOW HOW TO RESET THE WINDOWS SYSTEM ON MY MACBOOK.
IT'S DUAL SYSTEM. WINDOWS AND MAC.
MUST I HAVE TO UNINSTALL THE WINDOWS SYSTEM FIRST.THEN RESET?
BUT HOW TO UNINSTALL IT?
BY USING THE INSTALL DVD OR ANYTHING ELSE?
HAVE I NEED TO BACKUP FIRST?
AND HOW TO BACKUP THE FILES IN THE WINDOWS?While we all have MacBooks in this forum not all of us use BootCamp. There's a BootCamp Support Community where everybody uses BootCamp. You should also post this question there to increase your chances of getting an answer.
https://discussions.apple.com/community/windows_software/boot_camp -
How to find the target system landscape
How to find the target system landscape - the clients present in the target system. Please explain in detail.
regards,
ravikiranthis FM is giving only the current system id. I want to find the target system details.
-
How to extend the file system?
hello experts,
how to check wether file system is full?and how to extend the file system?Hi,
You can check whether your file system occupancy using Unix level command df -k.
how to extend the file system?
Whats the OS platform you working upon and need to extend the file system. Based on individual OS platform commands may vary.
Regards,
Deepak Kori -
How to design the "Bipair HashCode" ( in the int type )
When I use the short type "word 、Doc " .
It's ok!
public class Bipair{
short Word,Doc;
public Bipair(short in_Word,short in_Doc){
this.Word=in_Word;
this.Doc=in_Doc; }
public boolean equals(Object o) {
return (((Bipair)o).Word==this.Word && ((Bipair)o).Doc==this.Doc); }
public int hashCode() {
return Word<<16 | Doc; // fabricate a 32 bit int using two 16 bit shorts }
My question :
How to design the hashCode in the int type ?
public class Bipair{
int Word,Doc;
public Bipair(int in_Word,int in_Doc) {
this.Word=in_Word;
this.Doc=in_Doc; }
public boolean equals(Object o) { // of Object
return (((Bipair)o).Word==this.Word && ((Bipair)o).Doc==this.Doc); }
public int hashCode() { // of Object
return Word<<16 | Doc; // <=== how to design ????????????????
Thanks a lot .I get it.
// In Effective Java ^^
public int hashCode() { // of Object
// return Word<<16 | Doc; // fabricate a 32 bit int using two 16 bit shorts
int result=17;
result=37*result+Word;
result=37*result+Doc;
return result;
}
Maybe you are looking for
-
Trying to PXE Dell Venue 11 Pro with UEFI
Hello- I am trying to deploy WIndows 8.1 to a Dell Venue 11 Pro. It loads WINPE just fine, I get to the Choose a Task Sequence Screen and I choose a task sequence. Once the task sequence starts executing it stops on the Partition Disk 0 UFEI step. I
-
How to Block open outbond delivery
Hi All, Can anyone tell me how we can block the open outbond deliveries. It is requested to please give detail step by step. With Regards, Naveen Bhatia
-
Hi, I live in London, UK, and have a BT Total Broadband connection, which I just realised came with inclusive BT Openzone minutes. I rand BT Openzone and they immediately set up an account for me with username and password, and told me to go to a hot
-
Use of enhancement to add field in screen
please explain me how to add fields in standard transaction screen by using enhancement 6 in version 6.0 ?
-
Importing Oracle DBUM User Management 9.1.0.0 Fails
I am trying to import the Oracle DBUM User Management 9.1.0.0 connector but am receiving the following error, "Unknown tag OBJ_OFFLINED recieved." Any ideas on what may be causing this? Thanks, Pete