read from file or mysql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yang Li Ke

    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


  • Gerard van Wilgen

    #2
    Re: read from file or mysql


    "Yang Li Ke" <yanglike@sympa tico.ca> wrote in message
    news:hxASb.6692 $qU3.596842@new s20.bellglobal. com...[color=blue]
    > 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
    >[/color]

    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)

    Comment

    • Chung Leong

      #3
      Re: read from file or mysql

      Depends on what it is and how often it changes.

      Uzytkownik "Yang Li Ke" <yanglike@sympa tico.ca> napisal w wiadomosci
      news:hxASb.6692 $qU3.596842@new s20.bellglobal. com...[color=blue]
      > 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
      >
      >[/color]


      Comment

      • CountScubula

        #4
        Re: read from file or mysql

        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" <yanglike@sympa tico.ca> wrote in message
        news:hxASb.6692 $qU3.596842@new s20.bellglobal. com...[color=blue]
        > 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
        >
        >[/color]


        Comment

        • Tim Van Wassenhove

          #5
          Re: read from file or mysql

          On 2004-01-31, CountScubula <me@scantek.hot mail.com> wrote:[color=blue]
          > 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[/color]

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

          --

          Comment

          • CountScubula

            #6
            Re: read from file or mysql

            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" <euki@pi.be> wrote in message
            news:bvf7k1$rqf 42$1@ID-188825.news.uni-berlin.de...[color=blue]
            > On 2004-01-31, CountScubula <me@scantek.hot mail.com> wrote:[color=green]
            > > 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[/color]
            >
            > And why couldn't a file be considered as a database? :)
            >
            > --
            > http://home.mysth.be/~timvw[/color]


            Comment

            • Rahul Anand

              #7
              Re: read from file or mysql

              Tim Van Wassenhove <euki@pi.be> wrote in message news:<bvf7k1$rq f42$1@ID-188825.news.uni-berlin.de>...[color=blue]
              > On 2004-01-31, CountScubula <me@scantek.hot mail.com> wrote:[color=green]
              > > 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[/color]
              >
              > And why couldn't a file be considered as a database? :)[/color]

              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

              Comment

              • Tim Van Wassenhove

                #8
                Re: read from file or mysql

                On 2004-01-31, Rahul Anand <rahulanand_bis @rediffmail.com > wrote:[color=blue]
                > 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.[/color]

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

                [color=blue]
                > 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.[/color]

                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.
                [color=blue]
                > And the basic thing is: databases always store data in file system
                > only.[/color]

                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.


                --

                Comment

                • Chung Leong

                  #9
                  Re: read from file or mysql

                  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" <euki@pi.be> napisal w wiadomosci
                  news:bvf7k1$rqf 42$1@ID-188825.news.uni-berlin.de...[color=blue]
                  > On 2004-01-31, CountScubula <me@scantek.hot mail.com> wrote:[color=green]
                  > > 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[/color]
                  >
                  > And why couldn't a file be considered as a database? :)
                  >
                  > --
                  > http://home.mysth.be/~timvw[/color]


                  Comment

                  • Rahul Anand

                    #10
                    Re: read from file or mysql

                    Tim Van Wassenhove <euki@pi.be> wrote in message news:<bvfui8$rl dvo$1@ID-188825.news.uni-berlin.de>...[color=blue]
                    > On 2004-01-31, Rahul Anand <rahulanand_bis @rediffmail.com > wrote:[color=green]
                    > > 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.[/color]
                    >
                    > Err, what is your definition of database then?
                    > I define it as: a container that holds data.
                    >
                    >[color=green]
                    > > 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.[/color]
                    >
                    > 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.
                    >[color=green]
                    > > And the basic thing is: databases always store data in file system
                    > > only.[/color]
                    >
                    > 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.[/color]

                    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

                    Comment

                    • Tim Van Wassenhove

                      #11
                      Re: read from file or mysql

                      On 2004-02-04, Rahul Anand <rahulanand_bis @rediffmail.com > wrote:[color=blue]
                      > Tim Van Wassenhove <euki@pi.be> wrote in message news:<bvfui8$rl dvo$1@ID-188825.news.uni-berlin.de>...[color=green]
                      >> On 2004-01-31, Rahul Anand <rahulanand_bis @rediffmail.com > wrote:[color=darkred]
                      >> > 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.[/color]
                      >>
                      >> Err, what is your definition of database then?
                      >> I define it as: a container that holds data.
                      >>
                      >>[color=darkred]
                      >> > 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.[/color]
                      >>
                      >> 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.
                      >>[color=darkred]
                      >> > And the basic thing is: databases always store data in file system
                      >> > only.[/color]
                      >>
                      >> 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.[/color]
                      >
                      > 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".[/color]

                      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.

                      --

                      Comment

                      Working...