Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Database or text based?
Old 03-19-2005, 08:07 PM Database or text based?
Junior Talker

Posts: 3
Trades: 0
I am in the process of writing my own blog publishing software (PHP) I would like to know if it's better to use a database for storing posts and other data (and why) or just regular text files.

With text files I am thinking about making folders for each data, first line is name of the post, second is time/date, third author,.... where everything from n line on is the actual post.

As I don't know anything about databases so can someone tell me what would I gain with them over the system I described (btw, there is already blog software with almost the same .txt principal). I don't know anything MySQL but that's not really a problem as I want to learn but (until now) didn't find a reason why


Thanks.
Varg Vikernes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-20-2005, 07:30 AM
chiefbutz's Avatar
Skilled Talker

Posts: 60
Name: Jason
Location: Indiana (USA)
Trades: 0
I would say Databases. I learned PHP using a book, and the book first taught text files, then later it taught Databases. It said databases are better because you can have them being written to by multiple people at the same time. Textfiles only one person can write to them at a time. Does that help?

Last edited by chiefbutz; 03-20-2005 at 01:21 PM..
chiefbutz is offline
Reply With Quote
View Public Profile Visit chiefbutz's homepage!
 
Old 03-20-2005, 12:03 PM
Average Talker

Posts: 17
Trades: 0
I agree with chiefbutz.
LemmonLime is offline
Reply With Quote
View Public Profile Visit LemmonLime's homepage!
 
Old 03-20-2005, 03:42 PM
Junior Talker

Posts: 3
Trades: 0
Thanks chiefbutz, that helps.

Does that mean if two users would submit 2 comments at the same time, only one (or none?) would be written? If the comments would be stored in 1 text file.
Varg Vikernes is offline
Reply With Quote
View Public Profile
 
Old 03-20-2005, 03:57 PM
Novice Talker

Posts: 6
Trades: 0
Hehe, no. Thats not what he ment (I sure hope so). He ment by "you can have them being written to by multiple people at the same time" that more then one person can write the same blog.

And the two users would submit comments at the same time is almost impossible. Same fraction of a second? And anyway computer takes each command separately even if you manage to give them at the same time.

It's hard to underestand what chiefbutz really ment.
Anyway database is much much better. It has many good functions and it's easyer to manage it and get data from.
Krisx is offline
Reply With Quote
View Public Profile
 
Old 03-20-2005, 07:22 PM
Junior Talker

Posts: 3
Trades: 0
Thanks everyone, that helped a lot.
Varg Vikernes is offline
Reply With Quote
View Public Profile
 
Old 03-20-2005, 10:52 PM
Novice Talker

Posts: 13
Trades: 0
Use a database.
If you're going to store a lot of data, using a text file will make your site slower.


(And why the nick?)
Cactus is offline
Reply With Quote
View Public Profile
 
Old 03-20-2005, 11:41 PM
Novice Talker

Posts: 7
Trades: 0
Database is the choice over files. Infact that is the whole purpose of a database firsthand.

Databases were introduced to rectify the disadvantages in using files for datastorage. They are designed so as to optimize the space and overhead required for accessing and manipulating data.

So use database when ever u have some data to deal with. Its safer and better that way.
__________________

Please login or register to view this content. Registration is FREE


Get unlimited space and unlimted bandwidth with PHP, MySQL, CPanel and everything you need. No forced ads at all.
aaditya is offline
Reply With Quote
View Public Profile
 
Old 03-21-2005, 07:26 PM
dan245's Avatar
Skilled Talker

Posts: 59
Location: Massachusetts, USA
Trades: 0
I would prefer a database because it is faster and space saving.
dan245 is offline
Reply With Quote
View Public Profile
 
Old 03-22-2005, 06:57 AM
flish's Avatar
Novice Talker

Posts: 6
Location: Bucharest, Romania
Trades: 0
Databases its a must for you.

Text files would be an option if you intend to use XML and NOT just plain text. So if you are VERY good at XML use it. XML has great advantages one of them is being completly portable on anything you might think of. An XML based database works the same on any machine or OS.
flish is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Database or text based?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32071 seconds with 12 queries