By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

read from file or mysql

P: n/a
Hi guys!
I have some datas that I must check
everytime a visitor comes to my site
What is better to do:

1- Read data from a file
or
2- Read data from a mysql db

Thank you
--
Yang
Jul 17 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a

"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:hx*******************@news20.bellglobal.com.. .
Hi guys!
I have some datas that I must check
everytime a visitor comes to my site
What is better to do:

1- Read data from a file
or
2- Read data from a mysql db


Reading the data from a database is nearly always the best way. It will save
you a lot of problems.

Gerard van Wilgen
--
www.majstro.com (On-line translation dictionary / Enreta tradukvortaro)
www.travlang.com/Ergane (Free translation dictionary for Windows / Senpaga
tradukvortaro por Windows)

Jul 17 '05 #2

P: n/a
Depends on what it is and how often it changes.

Uzytkownik "Yang Li Ke" <ya******@sympatico.ca> napisal w wiadomosci
news:hx*******************@news20.bellglobal.com.. .
Hi guys!
I have some datas that I must check
everytime a visitor comes to my site
What is better to do:

1- Read data from a file
or
2- Read data from a mysql db

Thank you
--
Yang

Jul 17 '05 #3

P: n/a
a read from a db is also a read from a file.

file = file read
db = db + cool stuff + file read

if the db is on another server, then add + networking to other server

if its small and static, read from file
--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:hx*******************@news20.bellglobal.com.. .
Hi guys!
I have some datas that I must check
everytime a visitor comes to my site
What is better to do:

1- Read data from a file
or
2- Read data from a mysql db

Thank you
--
Yang

Jul 17 '05 #4

P: n/a
On 2004-01-31, CountScubula <me@scantek.hotmail.com> wrote:
a read from a db is also a read from a file.

file = file read
db = db + cool stuff + file read

if the db is on another server, then add + networking to other server


And why couldn't a file be considered as a database? :)

--
http://home.mysth.be/~timvw
Jul 17 '05 #5

P: n/a
I wasn't saying it cant be, in fact I am fan of flat file db's, I tend to
use a backend server with apache, and flat files, and do custom queries via
http to it, and get back contents if a form I like. sorta like local version
of remote services :)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Tim Van Wassenhove" <eu**@pi.be> wrote in message
news:bv************@ID-188825.news.uni-berlin.de...
On 2004-01-31, CountScubula <me@scantek.hotmail.com> wrote:
a read from a db is also a read from a file.

file = file read
db = db + cool stuff + file read

if the db is on another server, then add + networking to other server


And why couldn't a file be considered as a database? :)

--
http://home.mysth.be/~timvw

Jul 17 '05 #6

P: n/a
Tim Van Wassenhove <eu**@pi.be> wrote in message news:<bv************@ID-188825.news.uni-berlin.de>...
On 2004-01-31, CountScubula <me@scantek.hotmail.com> wrote:
a read from a db is also a read from a file.

file = file read
db = db + cool stuff + file read

if the db is on another server, then add + networking to other server


And why couldn't a file be considered as a database? :)


A *file* can not be considered as a *database*, because *files* are
implemented at OS level. Whereas databases are always implemented a
layer above OS.
True database adds overhead over file read operations when we read
some data. But it adds many features like synchronization,cache,search
etc over simple file read operation.
So, it all depends upon your requirement. If you need to read static
text every time it will be faster to save your data in a file. But if
you want to update some value every time you read the data, database
will be a better choice.

For faster performance it is always a better idea to cache your static
contents from database to files, and read from them.

And the basic thing is: databases always store data in file system
only.

--
Cheers,
Rahul Anand
Jul 17 '05 #7

P: n/a
On 2004-01-31, Rahul Anand <ra************@rediffmail.com> wrote:
A *file* can not be considered as a *database*, because *files* are
implemented at OS level. Whereas databases are always implemented a
layer above OS.
Err, what is your definition of database then?
I define it as: a container that holds data.

True database adds overhead over file read operations when we read
some data. But it adds many features like synchronization,cache,search
etc over simple file read operation.
They way i see it, it is the database management system that allows to
perform these operations on the database.

One could say that a filesystem is a dbms for files. And yes, most
filesystems allow you to perform file insert, update, search, etc
operations.
And the basic thing is: databases always store data in file system
only.


From my definition, a database doesn't store data. It is a container for
data. And the database is stored by the database management system.
--
http://home.mysth.be/~timvw
Jul 17 '05 #8

P: n/a
One file? I don't know. A collection of files in a directory structure,
maybe. I like to think that a database is a pool of data from which you can
easily extract a particular piece.

Uzytkownik "Tim Van Wassenhove" <eu**@pi.be> napisal w wiadomosci
news:bv************@ID-188825.news.uni-berlin.de...
On 2004-01-31, CountScubula <me@scantek.hotmail.com> wrote:
a read from a db is also a read from a file.

file = file read
db = db + cool stuff + file read

if the db is on another server, then add + networking to other server


And why couldn't a file be considered as a database? :)

--
http://home.mysth.be/~timvw

Jul 17 '05 #9

P: n/a
Tim Van Wassenhove <eu**@pi.be> wrote in message news:<bv************@ID-188825.news.uni-berlin.de>...
On 2004-01-31, Rahul Anand <ra************@rediffmail.com> wrote:
A *file* can not be considered as a *database*, because *files* are
implemented at OS level. Whereas databases are always implemented a
layer above OS.


Err, what is your definition of database then?
I define it as: a container that holds data.

True database adds overhead over file read operations when we read
some data. But it adds many features like synchronization,cache,search
etc over simple file read operation.


They way i see it, it is the database management system that allows to
perform these operations on the database.

One could say that a filesystem is a dbms for files. And yes, most
filesystems allow you to perform file insert, update, search, etc
operations.
And the basic thing is: databases always store data in file system
only.


From my definition, a database doesn't store data. It is a container for
data. And the database is stored by the database management system.


Thanx for pointing me about my errors.

But i was talking in context to "Storage of data: when we should use a
DBMS and when a File System".

By the context of matter i think it is clear where i am talking about
DBMS and where just database.

--
Rahul Anand
Jul 17 '05 #10

P: n/a
On 2004-02-04, Rahul Anand <ra************@rediffmail.com> wrote:
Tim Van Wassenhove <eu**@pi.be> wrote in message news:<bv************@ID-188825.news.uni-berlin.de>...
On 2004-01-31, Rahul Anand <ra************@rediffmail.com> wrote:
> A *file* can not be considered as a *database*, because *files* are
> implemented at OS level. Whereas databases are always implemented a
> layer above OS.


Err, what is your definition of database then?
I define it as: a container that holds data.

> True database adds overhead over file read operations when we read
> some data. But it adds many features like synchronization,cache,search
> etc over simple file read operation.


They way i see it, it is the database management system that allows to
perform these operations on the database.

One could say that a filesystem is a dbms for files. And yes, most
filesystems allow you to perform file insert, update, search, etc
operations.
> And the basic thing is: databases always store data in file system
> only.


From my definition, a database doesn't store data. It is a container for
data. And the database is stored by the database management system.


Thanx for pointing me about my errors.

But i was talking in context to "Storage of data: when we should use a
DBMS and when a File System".


A File System is a DBMS.

But i agree on the part where you say when files are more appropriate to
use, and when a rdbms like postgresql should be used.

--
http://home.mysth.be/~timvw
Jul 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.