Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 12th, 2007, 10:37 PM   #1
pal
Programmer
 
pal's Avatar
 
Join Date: Mar 2005
Location: Washington
Posts: 87
Rep Power: 4 pal is on a distinguished road
About SQL and XML

Is it possible to have every bit of thousands of user information to be stored in XML? If so, what is pros and cons about the security? (Compared to SQL database)
pal is offline   Reply With Quote
Old Jul 12th, 2007, 11:24 PM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Just think about the way databases are setup. Databases are built in such a way that changes to the structure does not effect any of the program used to access the databases. Where in a XML file, you would have to actually change some of the code thats parsing the XML file to retrieve data. Databases minimizes space as oppose to having a file increasingly grow and as it grows, the time to access information in files is increasing as well. Databases also restrict changes to it unless made by an authorized administrator and who are right to which tables in the databaes. They can also monitor activity to the changes made and if a system fails data is not lost!
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jul 13th, 2007, 2:56 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
XML is not a form of storage, it's a way to mark things up in a hierarchical manner.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 13th, 2007, 9:11 AM   #4
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 367
Rep Power: 0 King is an unknown quantity at this point
XML can be used for many things such as message passing, configuration, and data storing. For a big project you should use an actual database for data storage, but for a small local app XML would be just fine.
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Jul 13th, 2007, 9:15 AM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Again, XML is a format, not a storage methodology. You could store it in a flat file, or in a database, or on a piece of paper, or whatever.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 13th, 2007, 9:32 AM   #6
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 367
Rep Power: 0 King is an unknown quantity at this point
XML is a format which is nice to to store certain information in because it makes it easy to access different things you need in the file. For example configuration settings. I have worked at a couple places that use XML files for this purpose. As for using them to hold user data and such things a database would for sure be the better choice. But for a small local application, I don't see why using an XML file would be a bad thing.
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Jul 13th, 2007, 10:27 AM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I'm not saying it's a bad thing. I'm merely trying to correct the perception that it's a storage methodology. The particular container is the methodology. What's in the container might be XML or plain text or any number of things. The container might be a flat file or a relational database or something else. One chooses the format for good reasons and one chooses the container for (other) good reasons.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 13th, 2007, 6:08 PM   #8
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 367
Rep Power: 0 King is an unknown quantity at this point
Quote:
Originally Posted by DaWei View Post
I'm not saying it's a bad thing. I'm merely trying to correct the perception that it's a storage methodology. The particular container is the methodology. What's in the container might be XML or plain text or any number of things. The container might be a flat file or a relational database or something else. One chooses the format for good reasons and one chooses the container for (other) good reasons.
OK I see what you are saying now
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:15 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC