473,233 Members | 1,473 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,233 software developers and data experts.

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

Jul 17 '05 #1
10 1714
I noticed that Message-ID: <42**********@baen1673807.greenlnk.net> from
Dave Moore contained the following:
I'm wondering whether there are any other aproaches to
data storage that would be less elaborate than a full database.

Any ideas?.


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/
Jul 17 '05 #2
Dave Moore wrote:
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


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
Jul 17 '05 #3
Dave Moore wrote:
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


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)
Jul 17 '05 #4
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"
<si******************************************@spam yourself.com> wrote in
message news:42***********************@news.xs4all.nl...
Dave Moore wrote:
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
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

Jul 17 '05 #5
In: <42**********@baen1673807.greenlnk.net>, "Dave Moore" <da**********@baesystems.com> wrote:
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?.


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_array" 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
gu******@lnubb.pbz (rot13) User Management Solutions
Jul 17 '05 #6
Following on from Dave Moore's message. . .
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?.

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
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Jul 17 '05 #7
Dave Moore wrote:
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


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
Jul 17 '05 #8
"Dave Moore" <da**********@baesystems.com> wrote in message
news:42**********@baen1673807.greenlnk.net...
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?.


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

http://www.php.net/manual/en/ref.sqlite.php
Jul 17 '05 #9
Virgil Green wrote:
Dave Moore wrote:
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

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, 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)

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.


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
Jul 17 '05 #10
SqlLite is a thing you need|~maybe

Jul 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Scott J. McCaughrin | last post by:
The following program compiles fine but elicits this message from the linker: "undefined reference to VarArray::funct" and thus fails. It seems to behave as if the static data-member:...
7
by: smith4894 | last post by:
Hello, I have a question regarding storage locations for different data types. For example, dynamically created objects (using "new") are created on the heap. local objects ( foo() {int x;} )...
4
by: Ced | last post by:
Hi, i'm not an expert in C but i try to compile BTNG software under linux kernel 2.4.2-2. I get these errors at the very first stage. Does someone could have a rapid look on this and tell me...
6
by: kobu.selva | last post by:
I was recently part of a little debate on the issue of whether constants and string literals are considered "data objects" in C. I'm more confused now than before. I was always under the...
41
by: laimis | last post by:
Hey guys, I just recently got introduced to data mappers (DTO mapper). So now I have a SqlHelper being used by DTOMapper and then business layer is using DTOMapper when it needs to persist...
8
by: Art | last post by:
Hi folks, I'm writing a traditional desktop app using VB.NET and am stumbling over what seems like a very basic question: My app does not need to be connected to a server or another computer....
4
by: Holger Marzen | last post by:
Hi all, AFAIK it is possible for columns to be very large, up to about 2 GB. Are there any hints or experiences about storing binary data (jpg-images, pdf-documents) in PostgrreSQL with or...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
3
by: Atropo | last post by:
Hi, all. As you can see I'm just begining on C. with the tutorial "Sams Teach Yourself C in 24 Hours" as a starter. on aix 5.2 when compiling a helloWorld the gcc throws some warnings the...
10
by: Jeffrey | last post by:
My understanding is that if you write class X { int y; static int z; }; then you've defined (and declared) X and y, but you have only declared (and not defined) z. If you'd like to...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.