473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

read from file or mysql

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
10 5292

"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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JL | last post by:
Platform: Linux Red Hat RHEL 3 (and red hat 9) Installed MySQL from source. As a matter of fact, installed all LAMPS from source, and the mysql socket file was arranged in a place other than...
0
by: Taylor Lewick | last post by:
I have a large SQL file that contains a bunch of create table statements.= ... How do I get mysql to read in this file and process the sql. =20 I am not thinking load data infile because it...
0
by: Bennett Haselton | last post by:
I'm trying to port my MySQL tables for a database called "tracerlock" from one server to another. On the old server, in the /var/lib/mysql/tracerlock directory, there was a ".MYD", ".MYI" and...
6
by: Daniel Gwynne | last post by:
I am trying to read a mysql dump file that I was given from a mysql dump file into my mysql server, I am using the following command at the mysql command line and get the following error: mysql>...
0
by: whitemoss | last post by:
Hi All, I had written a code to read a file and insert it's contents to the database. Since I will receive 3 files every hour, so, this program should read those files and insert the contents...
6
by: dylan.boudreau | last post by:
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d PHP/5.0.4 on Solaris 10. phpinfo() lists the location of php.ini as /usr/local/apache/conf and my php.ini file is there but...
4
by: Ross | last post by:
Hello, I am trying to Read and Write to a text file on a web server using Microsoft Visual Basic 2005 Express Edition. So far I have managed to complete my testing with a local text file using...
4
by: =?ISO-8859-1?Q?Hans_M=FCller?= | last post by:
Good morning folks, I cannot read a binary file into a mysql database. Everything I tried did not succeed. What I tried (found from various google lookups...) is this: con =...
10
by: CDFTim | last post by:
O.K. that was a long Title... Can you help / show me how I would......... I am going to long windedly try to paint this picture. Backround: I have an html page that has a marquee function in it to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.