GetDotted Domains

Viewing Thread:
"Best method of databasing on website"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 25/07/01 at 00:02
Regular
Posts: 787
As we can't use any of the systems which encompass the database management such as mySQL and whatever else (never used them, but would have learned them if I could use them on freeola), what is the best method of storing information in files on the server for searching and accessing?

Simple databases I've done in the past have used a flat file approach, but the next project I want to move onto may involve (as the database increases) a substantial amount of data and the flat file approach would be rather inefficient.

So, what is the best way? I'm not exactly sure how to build a relational DBMS from scratch - any ideas? Maybe I should store each entry in it's own file and have an index. But then I wouldn't be able to search every entry, and would have to have key words, or something. Hmmmm. Anyone got any ideas?

Cheers,
Rikki
Fri 27/07/01 at 09:15
Regular
Posts: 612
OK now before I start I will tell you that I am a Microsoft Certified Professional (I will be an MCSE one day) and so am not anti-Microsoft just anti-IIS.

There are 3 main problems with IIS:

1. MONEY. It costs money to run IIS servers (£700 for a server licence and the a few hundred more for an IIS licence and a bit more for connection licences). As Freeola doesn't charge we cannot afford these servers (thank god for unix).

2. SECURITY. This was emphised recently by the code red bug. It let hackers gain complete administrative control. It lead toi the Whit house servers being hacked down and the US military taking its servers off-line just in case. Since this happened the White House have moved teir web site to Linux.

3. STABILITY. I was talking earlier with Turbo about this. Our Linux servers rarley crash. The downloads server may go down every few months because it run real server but on the whole they just don;t crash (it is advisable to restart the things every 2-3 months just to clear the memory and kill any usless processes).

Oh and finaly the fact that ASP, Access and FPE's (unless you want to run an unsecure linux box) all need IIS. It's another Microsoft monopoly type situation which Linux seems to be winning!
Fri 27/07/01 at 02:34
Posts: 0
Cheers for all the replies. I'm on freeola currently with a site, and I was planning on doing the next site (the one requiring the database) on freeola, because of the good price and pricing structure. However, I may have to try somewhere else for this.

I know about Access and have done some stuff with it in school, but as I say, I'm on freeola, so CGI and PHP are all I have access to, not ASP and mySQL(?) etc.

My flat file approach, ajg, works in CGI. Basically, it gets an input from either GET or POST from a HTML form, and stores that info in a line in a file. I don't parse (the info is sent as 'fieldn1=input1&field2=input2' and the extra ASCII symbols are hex encoded) the information unless I need to check the fields etc. The parsing is usually done when reading the file, where searching for a certain piece of data (eg. a username) in a certain field is done by reading each line, parsing it, matching the required field against the test data and continuing. That's very inefficient though, especially if the file gets big.

Maybe for the searching I could just use the Perl 'find' function (there must be one) to find the data, then only read in that line. Perl's searching is probably more efficient than mine. Also, I could pre-process a master file into directories depending on what they're sorted by, then have a file for each beginning letter that it's sorted by.

Cheers,
Rikki
Fri 27/07/01 at 01:36
Regular
"Eff, you see, kay?"
Posts: 14,156
Access, ODBS, ASP, ISS, PWS, you'd be best steering clear of the lot.

There's a multitude of reasons why but Andrew says it better than anyone.

Andrew, the floor is yours, but here's a start:

1) They're all made by Microsoft

Continue?
Thu 26/07/01 at 11:51
Regular
""
Posts: 303
Dav1d, you'd have to use ASP/JSP to query the database via an ODBC call. Not rocket science, but your host needs to allow this. IIS or Personal Web Server needs to be running.

But once you start thinking about databases and ODBC then you need to start thinking about the security implications too. Let the games begin!! lol

Is that enough detail for you?
Thu 26/07/01 at 03:18
Regular
"Eff, you see, kay?"
Posts: 14,156
Try FreeSQLHosts.com (I think). They give you a free SQL database that you can connect to. I haven't researched this though, it's just something I remembered.

Other than that, I once heard of a PHP scriptset the uses flatfiles but you can pass SQL-like commands to it. It's very, very complicated and you need quite a bit of space. I don't know where to get it from but it's out there.
Wed 25/07/01 at 23:37
Regular
Posts: 2,982
ajg....

You mentioned about using Microsoft Access for the databases...

How does this work?

I know how to make databases on access, but how would I link it to my website and what html would I need to access the database?

I've used Microsoft Access at school and know the basics to make a database, would I need any extra knowleadge to work this on a website?

Thanks

Dav1d
Wed 25/07/01 at 20:54
Posts: 0
It is possible to create a database using flat files .csv with keyfields and things. You can do a lot of clever stuff using just comma seperated files and PHP, but it is A LOT of work and is very slow.
Wed 25/07/01 at 10:32
Regular
""
Posts: 303
Don't think it's possible to go in to the details of database design in a forum like this. It's far to complex a topic.

But if you've got any specific questions, run them by me. I've got a pretty good idea of the basics. I've done DBA work in the past.

M$ Access is a good place to start if you want to play about with designing databases. It's pretty easy to get the hang of. You can also use ASP/JSP to access them through your webpage (although not if you're hosted by Freeola). Start with say, a 'People' table with name, dob etc in. Then add another table - 'Address', linked to 'People' on a unique key. And build up your database like that.

Is that the sort of thing you're after? Does that answer your question? Give me a shout if not.

I'm interested in the flat-file approach though. Is that all maintained in HTML or some other language? I'm assuming it's a series of opens, reads etc, but I haven't seen any examples of doing it this way.

cheers
ajg
Wed 25/07/01 at 00:02
Posts: 0
As we can't use any of the systems which encompass the database management such as mySQL and whatever else (never used them, but would have learned them if I could use them on freeola), what is the best method of storing information in files on the server for searching and accessing?

Simple databases I've done in the past have used a flat file approach, but the next project I want to move onto may involve (as the database increases) a substantial amount of data and the flat file approach would be rather inefficient.

So, what is the best way? I'm not exactly sure how to build a relational DBMS from scratch - any ideas? Maybe I should store each entry in it's own file and have an index. But then I wouldn't be able to search every entry, and would have to have key words, or something. Hmmmm. Anyone got any ideas?

Cheers,
Rikki

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Just a quick note to say thanks for a very good service ... in fact excellent service..
I am very happy with your customer service and speed and quality of my broadband connection .. keep up the good work . and a good new year to all of you at freeola.
Matthew Bradley
Second to none...
So far the services you provide are second to none. Keep up the good work.
Andy

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.