Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Linked List Like Tables

$
0
0

Dear All

Thank you for your attention.

I am writing a hiking guide system that helps user to find out if they go wrong path.

I would like to know the BEST PRACTICE and DATA TABLE STRUCTURE for storing the hiking rules which is just like a linked list and how to retrive back the data.

The hiking rules in my system

e.g.

PathCheck PointNext Check Point
112
123
12223
12327
12728

PathCheck PointNext Check Point
112
123
22223
22324
22425

When a user pass check point 23 and go to check point 29, the system WARN the user his next check point should be 24 or 27.

When the user pass check point 23 and then go to check point 24, the system INFORM the user next check point is 25.

A) I need to get back the whole list for each path

e.g. Path 1 -- 1 > 2 > 3 > 22 > 23 > 27 > 28

Path 2 -- 1 > 2 > 3 > 22 > 23 > 24 > 25

B) I need to get the previous and next checkpoint

e.g. At check point 23, get previous check point 22 and next possible check points 24 or 27

C) An interface for user to add/edit/delete and arrange the sortings of the rules

Anyone please let me know any ideas about the best tables and structures for linked list

Many Thanks

Best Regards

Ivan


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>