Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 17th, 2004, 02:38 PM
David_ David_ is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 David_ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Menu Representation In a Database

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

Reply With Quote
  #2  
Old December 20th, 2004, 03:38 AM
sbkwi sbkwi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Regensburg, Germany
Posts: 134 sbkwi User rank is Sergeant (500 - 2000 Reputation Level)sbkwi User rank is Sergeant (500 - 2000 Reputation Level)sbkwi User rank is Sergeant (500 - 2000 Reputation Level)sbkwi User rank is Sergeant (500 - 2000 Reputation Level)sbkwi User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 20 h 22 m 20 sec
Reputation Power: 10
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Menu Representation In a Database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT