|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Guys,
I'm new to the forum, my name's David. I'm trying to redesign a menu for a WebApp. Currently I have a structure with menucodes such as this 12-13-01-05 and then we parse this to figure out where is each menuitem located. Now this imposes a problem for creating an automatic menu creation interface. So now I want to put the menu in a database but I'm not sure as to how to do this in order to be able to do insertions and deletions efficiently. After some research I figured that the only way to do this is to somehow store an ordered (or tree-like - both will work) structure into a database. This is a challenge as the DB doesn't hold the order of the elements and if I order them up with an ID then after deletion and insertion I might have to rewrite all the IDs which is no good for the web app. So what I'm looking for is any suggestion on how to store a menu into a database? maybe some links if you know any? Thanks, David |
|
#2
|
|||
|
|||
|
Without knowing something about your webapp it's difficult to recommend a solution, but from what you said I think you could consider the following:
- a menu structure usually is read much more often than modified. So reading the menu tree should be very fast, while inserting or removing items may not need to be. - if the menu structure is the same for all users of the webapp ldap might be a good solution because it't optimised for storing and fast retrieving of tree-like structurs - if the menu structure is individually created per user, I would translate it to XML and store the XML text together with the user data in a database. Storing and retrieving a menu structure to and from XML should be an easy task. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > Menu Representation In a Database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|