473,651 Members | 2,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1738
I noticed that Message-ID: <42**********@b aen1673807.gree nlnk.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************ *************** *************** @spamyourself.c om> 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**********@b aen1673807.gree nlnk.net>, "Dave Moore" <da**********@b aesystems.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_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
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******@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>
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**********@b aesystems.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

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

Similar topics

8
4579
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: VarArray::funct were an extern, but it is declared in the same file (q.v.). What is the remedy for this? =================
7
2463
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;} ) are on the stack. 1)Where are global non-const objects created? 2)Where are global const objects created?
4
25445
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 what's wrong regards I get this error:
6
2012
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 understanding that only "named" storage areas(from the standard) were data objects. Since constants and string literals don't have lvalues, they can't be data objects. Yet, I was shown the first page of chapter 2 in K&R2, which states that variables...
41
4684
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 object to database or load them back. Everything is working nicely so far. My question is, is it OK practice to use DTOMapper rfom the presentation layer? For instance, if I want to present in HTML format the list of entries in my database, should I...
8
3765
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. It just runs locally. So what is the best way to store user-entered data? The app is like an address book, where users can enter contacts and save the data.
4
4026
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 without the complicated lo-stuff? Of course it's in many cases a good approach to store those files simply in the file system but there's always a risk of running out of sync (filesystem and tables), e.g. by deleting files and not deleting the table...
12
3754
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 question is about storing data in a database. Yes I understand that you can link to a database in your program and read and write to the database etc etc. Well, that's all find and dandy but what if the person you're writing the application for...
3
1898
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 system adminitrator does'nt know anything about. could you point me where to check the gcc conf. or what i'm doing wrong Atropo@seagullmore captura.c #include <stdio.h>
10
2515
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 actually define z, you also need to add
0
8347
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8792
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8694
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.