data storage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Moore

    data storage

    Hi All,
    I want to be able to store data as part of my website. I'm assuming that
    I''ll need to use PHP scripts to provide this functionality, but what would
    the best aproach be to storing data?. I could use a database of some sort
    (maybe MySQL?), but I'm wondering whether there are any other aproaches to
    data storage that would be less elaborate than a full database.

    Any ideas?.

    Dave



  • Geoff Berrow

    #2
    Re: data storage

    I noticed that Message-ID: <4237074a$1_1@b aen1673807.gree nlnk.net> from
    Dave Moore contained the following:
    [color=blue]
    > I'm wondering whether there are any other aproaches to
    >data storage that would be less elaborate than a full database.
    >
    >Any ideas?.[/color]

    Database or files. Take your pick.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Erwin Moller

      #3
      Re: data storage

      Dave Moore wrote:
      [color=blue]
      > Hi All,
      > I want to be able to store data as part of my website. I'm assuming
      > that
      > I''ll need to use PHP scripts to provide this functionality, but what
      > would the best aproach be to storing data?. I could use a database of some
      > sort (maybe MySQL?), but I'm wondering whether there are any other
      > aproaches to data storage that would be less elaborate than a full
      > database.
      >
      > Any ideas?.
      >
      > Dave[/color]

      Hi Dave,

      Well, you can always use files to store data.
      But you should wonder if the initial ease of coding is not backfiring later.
      (I think it will)

      If you use files to store data (often called: flatfile approach), you will
      face a LOT of extra headages later on in the project, like:
      - bad performance

      - you have to prepare your files against concurent writes by different
      request/commands from clients.
      Use filelocking to prevent this. (= extra work)
      If you do not it is just a matter of time before your files become corrupt.

      - If the data you store is even a little bit complex, you will soon face the
      fact that you have to open many files, scan them, do a lot of processing.
      This is EXCACTLY where SQL makes things easier for you.

      If you have no experience using databases, this might be a little
      intimidating at first glance.
      But take it from a guy who did actually make dynamic websites using flat
      files in Perl: it is ABSOLUTELY worth the time/study investment.
      Go database.

      Of course I do not know your actual requirements, but studying databases is
      most probably worth your while.

      Have a look at www.w3schools.com for some great tutorials.

      As for your choice of database: Go mySQL or Postgresql.
      I think both are under the GPL licence. (= Free as in Freedom :-)
      I prefer Postgresql because it is a robust, featurerich opensource database.
      But MySQL should do most jobs just as fine (and a little bit faster. :-)

      Hope this helps.

      Regards,
      Erwin Moller

      Comment

      • Kenneth Downs

        #4
        Re: data storage

        Dave Moore wrote:
        [color=blue]
        > Hi All,
        > I want to be able to store data as part of my website. I'm assuming
        > that
        > I''ll need to use PHP scripts to provide this functionality, but what
        > would the best aproach be to storing data?. I could use a database of some
        > sort (maybe MySQL?), but I'm wondering whether there are any other
        > aproaches to data storage that would be less elaborate than a full
        > database.
        >
        > Any ideas?.
        >
        > Dave[/color]

        How much data? What kind of data? Do you mean pictures and text documents
        or things like sales orders and employee records?

        Generally, if you are going to store business data, you will sooner or later
        master a database, so you can start now or start later. Many try to gloss
        over this fact and it limits what they can get done.

        If it is not business data, it gets more gray and you would have to provide
        more details.

        --
        Kenneth Downs
        Secure Data Software, Inc.
        (Ken)nneth@(Sec )ure(Dat)a(.com )

        Comment

        • Dave Moore

          #5
          Re: data storage

          Hi Erwin,
          Thanks for the pointers. I am slightly familiar with SQL 'INSERT',
          'SELECT' etc, so this is not too scary. However, can you recommend a
          webspace hoster that will accept server side PHP and MySQL databases to be
          run?. Also, how would you suggest that I approach developing the site? -
          should I develop using a webserver (like Apache) on my desktop locally and
          then keep my fingers crossed that it will port OK to a hoster's webserver?.

          Ta,
          Dave




          "Erwin Moller"
          <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
          message news:42370ed0$0 $28984$e4fe514c @news.xs4all.nl ...[color=blue]
          > Dave Moore wrote:
          >[color=green]
          > > Hi All,
          > > I want to be able to store data as part of my website. I'm assuming
          > > that
          > > I''ll need to use PHP scripts to provide this functionality, but what
          > > would the best aproach be to storing data?. I could use a database of[/color][/color]
          some[color=blue][color=green]
          > > sort (maybe MySQL?), but I'm wondering whether there are any other
          > > aproaches to data storage that would be less elaborate than a full
          > > database.
          > >
          > > Any ideas?.
          > >
          > > Dave[/color]
          >
          > Hi Dave,
          >
          > Well, you can always use files to store data.
          > But you should wonder if the initial ease of coding is not backfiring[/color]
          later.[color=blue]
          > (I think it will)
          >
          > If you use files to store data (often called: flatfile approach), you will
          > face a LOT of extra headages later on in the project, like:
          > - bad performance
          >
          > - you have to prepare your files against concurent writes by different
          > request/commands from clients.
          > Use filelocking to prevent this. (= extra work)
          > If you do not it is just a matter of time before your files become[/color]
          corrupt.[color=blue]
          >
          > - If the data you store is even a little bit complex, you will soon face[/color]
          the[color=blue]
          > fact that you have to open many files, scan them, do a lot of processing.
          > This is EXCACTLY where SQL makes things easier for you.
          >
          > If you have no experience using databases, this might be a little
          > intimidating at first glance.
          > But take it from a guy who did actually make dynamic websites using flat
          > files in Perl: it is ABSOLUTELY worth the time/study investment.
          > Go database.
          >
          > Of course I do not know your actual requirements, but studying databases[/color]
          is[color=blue]
          > most probably worth your while.
          >
          > Have a look at www.w3schools.com for some great tutorials.
          >
          > As for your choice of database: Go mySQL or Postgresql.
          > I think both are under the GPL licence. (= Free as in Freedom :-)
          > I prefer Postgresql because it is a robust, featurerich opensource[/color]
          database.[color=blue]
          > But MySQL should do most jobs just as fine (and a little bit faster. :-)
          >
          > Hope this helps.
          >
          > Regards,
          > Erwin Moller[/color]


          Comment

          • nospam@geniegate.com

            #6
            Re: data storage

            In: <4237074a$1_1@b aen1673807.gree nlnk.net>, "Dave Moore" <dave.m.moore@b aesystems.com> wrote:[color=blue]
            >Hi All,
            > I want to be able to store data as part of my website. I'm assuming that
            >I''ll need to use PHP scripts to provide this functionality, but what would
            >the best aproach be to storing data?. I could use a database of some sort
            >(maybe MySQL?), but I'm wondering whether there are any other aproaches to
            >data storage that would be less elaborate than a full database.
            >
            >Any ideas?.[/color]

            Very deep question, database is easier for most things, particularly updates
            and queries. mysql is more popular, which is why I use it. I perfer postgresql
            though. You don't have file permission issues with mysql. (Just access issues)

            DBM's are some-what less elaborate.

            There are a few dbm implementations , these are files but you get a key -> value
            type of interface. Useful for high speed access, terrible if you need to span
            hosts. Shouldn't be a problem to serialize an object and store to a DBM, this
            would give you a "key => $object_or_arra y" type of functionality. It would
            be terrible if you needed to lookup data based on something besides a single
            primary key. (You'd have multiple "alternate index" DBM's to maintain on each
            update)

            Flat files are often good for file uploads.

            I tend to use a combination of database + files, for the different data.

            I'd probably go with an SQL database, it'll make your life easier in the long
            run and probably make your web site more stable.

            Jamie
            --
            http://www.geniegate.com Custom web programming
            guhzo_42@lnubb. pbz (rot13) User Management Solutions

            Comment

            • Peter Fox

              #7
              Re: data storage

              Following on from Dave Moore's message. . .[color=blue]
              >Hi All,
              > I want to be able to store data as part of my website. I'm assuming that
              >I''ll need to use PHP scripts to provide this functionality, but what would
              >the best aproach be to storing data?. I could use a database of some sort
              >(maybe MySQL?), but I'm wondering whether there are any other aproaches to
              >data storage that would be less elaborate than a full database.
              >
              >Any ideas?.[/color]
              MySQL is a doddle. myAdmin is a convenient management tool.
              Documentation for MySQL is excellent. You'll find it handy anyway. Now
              is your opportunity to emerge from the primeval swamp as it were.

              Large user supplied data files might be better in a file system -
              uploading files isn't difficult. Downloading files is only half a dozen
              lines of code....
              ....but you'll need some database to manage the files.

              Or you could try carving the information as intricate designs on
              potatoes, chips and crisps. A taterbase.




              --
              PETER FOX Not the same since the poster business went to the wall
              peterfox@eminen t.demon.co.uk.n ot.this.bit.no. html
              2 Tees Close, Witham, Essex.
              Gravity beer in Essex <http://www.eminent.dem on.co.uk>

              Comment

              • Virgil Green

                #8
                Re: data storage

                Dave Moore wrote:[color=blue]
                > Hi Erwin,
                > Thanks for the pointers. I am slightly familiar with SQL 'INSERT',
                > 'SELECT' etc, so this is not too scary. However, can you recommend a
                > webspace hoster that will accept server side PHP and MySQL databases
                > to be run?. Also, how would you suggest that I approach developing
                > the site? - should I develop using a webserver (like Apache) on my
                > desktop locally and then keep my fingers crossed that it will port OK
                > to a hoster's webserver?.
                >
                > Ta,
                > Dave
                >[/color]

                I'd expect it to be more difficult to find hosts that *don't* support the
                PHP and MySQL combination. Plenty of inexpensive hosts out there. I use
                lunarpages.com but there are hundreds of others out there. Visit
                webhosttalk.com for background on many web hosts.

                Yes, do your development locally and then post it when it's ready... or have
                two hosted accounts that you use so there is a development and a production
                environment. It's worth it.

                --
                Virgil


                Comment

                • Chung Leong

                  #9
                  Re: data storage

                  "Dave Moore" <dave.m.moore@b aesystems.com> wrote in message
                  news:4237074a$1 _1@baen1673807. greenlnk.net...[color=blue]
                  > Hi All,
                  > I want to be able to store data as part of my website. I'm assuming[/color]
                  that[color=blue]
                  > I''ll need to use PHP scripts to provide this functionality, but what[/color]
                  would[color=blue]
                  > the best aproach be to storing data?. I could use a database of some sort
                  > (maybe MySQL?), but I'm wondering whether there are any other aproaches to
                  > data storage that would be less elaborate than a full database.
                  >
                  > Any ideas?.[/color]

                  If your host runs PHP 5, you can use SQLite.

                  PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.



                  Comment

                  • Erwin Moller

                    #10
                    Re: data storage

                    Virgil Green wrote:
                    [color=blue]
                    > Dave Moore wrote:[color=green]
                    >> Hi Erwin,
                    >> Thanks for the pointers. I am slightly familiar with SQL 'INSERT',
                    >> 'SELECT' etc, so this is not too scary. However, can you recommend a
                    >> webspace hoster that will accept server side PHP and MySQL databases
                    >> to be run?. Also, how would you suggest that I approach developing
                    >> the site? - should I develop using a webserver (like Apache) on my
                    >> desktop locally and then keep my fingers crossed that it will port OK
                    >> to a hoster's webserver?.
                    >>
                    >> Ta,
                    >> Dave
                    >>[/color]
                    >
                    > I'd expect it to be more difficult to find hosts that *don't* support the
                    > PHP and MySQL combination. Plenty of inexpensive hosts out there. I use
                    > lunarpages.com but there are hundreds of others out there. Visit
                    > webhosttalk.com for background on many web hosts.[/color]

                    Yes, Virgil is completely right: Every ISP that is worth anything should
                    offer it.
                    Only exception are those pesky W$-only providers, they tend to stick ACCESS
                    and SQL-server.
                    If you are lucky they offer MySQL too.

                    But please try to find an provider that offers:
                    - GNU/Linux OS.
                    - Apache (1.3 or higher)
                    - PHP (at least 4.3, but preferably PHP5)
                    - MySQL or Postgresql

                    Relevant might be the LAMP shortcut:
                    Linux
                    Apache
                    MySql
                    Php

                    But I don't like that name LAMP, because it doesn't pay credit to the
                    GNU-part in Linux, which makes up over 95% of what many people call Linux.
                    GNU/Linux is a better name.

                    Provider?
                    I live in the Netherlands, Europe.
                    The best deal over here is XS4ALL. They run FreeBSD, and are very good
                    technically. (Maybe they run GNU/Linux too, not sure)


                    [color=blue]
                    >
                    > Yes, do your development locally and then post it when it's ready... or
                    > have two hosted accounts that you use so there is a development and a
                    > production environment. It's worth it.[/color]

                    Dave, Virgil is giving very good advise.
                    If possible try to do that.
                    You are doing yourself a huge favor. :-)

                    Good luck.

                    Regards,
                    Erwin Moller

                    Comment

                    • surfchen

                      #11
                      Re: data storage

                      SqlLite is a thing you need|~maybe

                      Comment

                      Working...