Closed Thread
Results 1 to 3 of 3

Thread: Data base or xml ?

  1. #1
    zeroradius's Avatar
    zeroradius is offline Speaks fluent binary
    Join Date
    Feb 2008
    Location
    Ohio
    Posts
    1,403
    Rep Power
    25

    Data base or xml ?

    Hey guys,

    I am making a forum using PHP with MySQL. I have gotten the basics of the forum to work. However I want to include a side pannel next to each post with information about the user (name (FK), age, avatar, sig, and so on.). The post data and the user data are stored in two seprate tables. The user data will be selected for each post depending on the user whom made the post. I use a while loop with a mysql_fetch_array to select and layout the data. At first I figured I would do a join to get both sets of data but then I relised that would just randomly return the user data with the post data. I could run a second select querry inside of the while loop so that it selected for each post that is in that topic but I don't know much about memory and banwidth management, so I am afraid that I may greatly slow down my site or cause a DOS on my own site. I have never used xml but after listining to other people talk about it I thought that maybe I could store the User data in XML and select the corect filed based on the name returned in the posts data.

    So my question is would doing the multiple selects as I described do what I fear it will, Is there a diffrent method of doing this, and what method will work the best.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Data base or xml ?

    I can't back this up at all, but I don't think you'll see any significant gains by using XML, and you will force yourself to think in 2 paradigms instead of one. If you are seeing slow-downs because of the extra queries, I would look at your indexes before I bailed on the database.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Jordan Guest

    Re: Data base or xml ?

    Quote Originally Posted by zeroradius View Post
    At first I figured I would do a join to get both sets of data but then I relised that would just randomly return the user data with the post data.
    I do not understand this. As you are loading/looping through each post does the post row not have an identifier to the user id that made the post? If so, how could it randomly return data?

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sugestion needed . C data base.
    By umm88 in forum C and C++
    Replies: 1
    Last Post: 06-17-2010, 11:44 PM
  2. Base number
    By Apprentice123 in forum General Programming
    Replies: 5
    Last Post: 05-09-2009, 01:12 PM
  3. Can't update my Data Base with ODBC
    By Elmismo in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-07-2009, 03:15 PM
  4. base conversion in C
    By jack1234 in forum C and C++
    Replies: 3
    Last Post: 11-05-2007, 09:19 AM
  5. access data base from java applet
    By stack in forum Java Help
    Replies: 0
    Last Post: 09-30-2007, 01:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts