hi all. ive just this minute joined the forum. Im looking to redesign a web ste for a friend. He's a landlord and has a bunch of houses (30 or so) that he rents out to students. He wants to be able to store and change all the nformation about these houses in a database, and have the property information pages on the site dynamically populated and updated.
My idea was just to create seperate html pages from the information not linked to a database, but this would mean later on changes to the database would have to be repeated for the website, so maybe it is a good idea to roll everything ot one.
After reading a reply on this forum, im not sure it should be a flat file, there would be quite a lot of information ( room size, no. of rooms, price, location, local amnities, bla bla etc.)
Im not sure quite how to go about it, ive heard about sql and ms access and oracle and all, but dont really understand what they all are, or what they actually do, whether they are software products or what, whether they would be installed on the server or my friends computer. if its on the server how to you interact with it or even go about setting it up.
I understand that there is a database, and on the website there is somekind of fetch command or something, but im obviously missing alot because it seems to me that it should be possible to upload a excel spreadsheet and fetch information from that somehow.
I d really appreciate it someone could lay down a simple step by step plan for getting something like this set up, or let me know where i can find information to educate myself, and get my head around it all.
Thanks all.
Rika.
Sat Jul 24, 04 9:27 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject: Setting up a mysql database for web
Hi Rika,
Glad that you found us. Hope you will have a fun stay here.
Yes, it is definitely a good idea to go for a database solution in your case. You do not want to go about altering 6/7 pages everytime to reflect a small change in the number of apartmentt to lease. As I see it, your problem is not really about flat file and databse. Flat file is also a database system. But it is not relational, that's all. Here the data is stored in comma or some other symbol delimited format. Usually in a simple text file. On the other hand databases like mysql, access, or oracle is a full featured relational database. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organised in tables. A table is a collection of rows or records and each row in a table contains the same fields. Certain fields may be designated
as keys, which means that searches for specific values of that field will use indexing to speed them up.
So anyway, once you decide that a database is necessary(and I see that it is) for what you want to accomplish, you have to think about
1. which database to use.
2. How to organize the data
3. How to get the data in there
4. How to access the data
5. How to display the data in a user interface.
Roughly, these are the steps.
1. Which database to use?
I see that you have two parts of the project. One is perhaps, already prepared in some excel sheet. Right? Another will be an online based solution. So here is more decision to make for you.
Are you going to keep it that way, or move the whole thing to online. For example, you can make a total solution so that in future the client can input all the data in the web based system. Do away with the excel sheet.
Or you will have to synchorise two sets of data regularly. Because you can not use the excel sheet for the web based solution. The reason is, the web site or the web based solution must reside on a web server. The server is either apache or microsoft IIS. And it is using either mysql or access respectively. Oracle is a rarety unless things are real huge! This answers your question:
Quote:
it seems to me that it should be possible to upload a excel spreadsheet and fetch information from that somehow.
You have to export the excel sheet data to the web database somehow. You just cannot use it directly. So first step is find out about the database on your web server.
What server you are on? What database it has? Do you have the permission to make new database? Ask your host about them. Or go through the details of the host package that you bought.
To go about the rest of the process we need this information.
For step 3/4/5 we need to know, if you had any previous experience with a server side scripting language? Like php/asp/jsp? If not you will need to learn one of them. There is absolutely no way around. You cannot do this with simple html. You need some very flexible and full fledged programming language. But even in this case, your choice of programming language somewhat depends on your web host. If it is hosting your web site on ms IIS, then probably you are better off with ASP. On the other hand PHP is a strong candidate for apache based server.
So we will go forward after you find out that info and we decide upon a database and a choice of programming language. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Post subject: what do you thinks best for the job?
thanks quantum.
Ill find out about the server incase he doesnt want to change web hosts, but im sure if there are any issues of simplicity or suitability with the different languages, then he wont mind changing hosts.
Ill try and explain as best i can the requirements, and maybe youll be able to tell me what language, database etc is best.
The website is for a list of houses he rents out, so in theory he should be the only person editing the database, the site only advertises the properties, contracts and all that jazz are done with old fashioned paper and ink.
anyone visiting the site, hopefully, will have 5 options when looking for properties. One option would be for properties near college#1 of 4 colleges, option 2 would be for houses near college#2 etc, and option 5 would be to view all properties.
So this would bring up a list of properties. But rather than just a list of house names, with each property should be a small amout of info (#of rooms, availabilty etc) and a picture or two.
Each property here should then link to a page with all the details of that property ie area, room sizes, garden, amenities etc and more pictures.
If im right, most probably not, that would mean making 2 pages ie. 'property_list' and 'property_details and they would be dynamically filled with the relevant information from the database. Thats the aim anyway, so that everypart of adding a new property to the site or editing existing properties could be done JUST by editing the database, the site taking care of itself.
I have a feeling that it not going to be completely possible, is there going to be a problem with the images of the properties, i doubt its possible to add an image to a database, but is it possible to somehow retrieve from the database the info/code/command to find and display the correct picture file.
I dont know whether any of that makes a difference when choosing how to go about things.
I dont have any experience with php, asp, or jsp, nothing really beyond old html, but its about time I became multi-lingual, so if you know of any good mini-courses or tutorials (preferably free), ill get stuck in.
Thanks again.
Rika.
oh, is there a limit to the number of records/rows per table in ms access?
Sat Jul 24, 04 6:44 pm
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject:
All the requirements you are saying is very much possible. Much much more complex things are being done with a choice of right database and scripting language. Including adding the image part. As I see per your intention, you have to write the script in such a way so that, each time a page is requested the program will run through records in the table and display them in a relevent manner. Very easy. You can have the picture file directly in the database as a blob field. But I do not recommend that. This will take huge space and slow dows the things. Instead the more efficient way to do this is; save the images in a folder as standard jpg format and then associate a link to the picture with the related field in database.
If choosing a required host is no problem then my choices are very easy. Go with mysql and php. The two most powerful, fleible, easiest, and now a days most commonly used language for developing dynamic web sites. Check out all the related threads for resources and tutorials in the web scripting forum. There is more than enough info and links to resources to get you started on the road to php. You will find this is a fun language to learn. If you had any programming eperience, it will be a snap to get into the php mode. If not, then it is probably the BEST language to dip into programming world(html is a formatting language, not programming language). For mysql itself you only need to know some structural info on the database. The main activities are take care of by standard SQL query. (mysql and sql query language is different). So you can consider that as a part of php too.
In mysql technically there is no limit to how many records or tables you can use.
From mysql manual:
Quote:
# Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users that use MySQL Server with 60,000 tables and about 5,000,000,000 rows.
# Up to 32 indexes per table are allowed. Each index may consist of 1 to 16 columns or parts of columns. The maximum index width is 500 bytes (this may be changed when compiling MySQL Server). An index may use a prefix of a CHAR or VARCHAR column.
Access has limit of 1024 tables per database as far as I know. Though no limit on recordset.
Unless you are building something to handle a site like amazon, there is absolutely no reason to worry about it. I think, mysql can handle even something more than amazon.com or yahoo. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
well i found out that the server hes on supports php but not mysql. The trouble is the hosting company is only down the road so hed like to stay with them if possible.
Can all this be done with access?
i know access can create data access pages and queries and stuff, but will i be able to do all i want just through the software, or will i need to learn one of languages, and code myself. if so what server side scripting language would be best.
Hope someone can help.
Thanks again.
Rika
Mon Aug 09, 04 8:14 pm
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject: Creating database solution
MS Access is just another database like mysql and almost has all the features like mysql. So yes, you can use access. But access, like mysql is nothing more than a database that stores the data in a systematic manner and provides an interface to access and manipulate that data. To do that manipulation you will need a programming language. In this case, a server side one. ASP is perhaps, preferable to work with access. But PHP as well can pull all the tricks that ASP can. So pick either one.
Now check out first, if the host has MS Access database feature. If mysql is not present in the current package then there is slim chance that they will have access either. Anyway, check that out first. Another thing is that, Apache and Mysql is so ubiquitous and such a nice pair that that almost every single reputable host will have them in one of their packages. So your client may not need to change host, but just need to get another hosting package that has php and mysql both. No need to change the host itself. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Tue Aug 10, 04 3:11 am
dinangkur Super Moderator
Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
Post subject:
I agree with qunatum regarding the solution, but i've a slight different view regarding access and mysql theoritically. Ms-access in not a RDBMS, MySQL is. There is few basic features such trigger, store procedure need to be add to do some basic RDBMS function. I think MySQL is far more advance than access and offer more professional facilitties.
MySQL has been developed with speed as a primary requirement. MySQL is a server based DB, Access doesn't have a true server based architecture and is really just a file on disk with each client managing their own connection to the db.
You could also take a look at the firebird database
[http://firebird.sourceforge.net]
If I were you I'd take a look at MSDE instead of Access. Its a free version of SQL server so it offers you a very natural upgrade path to SQL server if you need to upgrade in the future.
-DK. _________________ ...we too are stardust...
Tue Aug 10, 04 4:06 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject: Ms Acces and my sql differences
Quote:
Ms-access in not a RDBMS, MySQL is. There is few basic features such trigger, store procedure need to be add to do some basic RDBMS function. I think MySQL is far more advance than access and offer more professional facilitties.
Agreed DK. But that's why I said MS Access has almost all the features like mysql. At any rate, I think, the performance issue is negligible for such a small project.
Most probably that guy bought a windows package. If it has ms access, then nothing would justify ms access database on an apache server. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
I haven't read the whole posts but if you want readymade app and free one, you can go for Open-Realty
its using php and mysql _________________ Sarder Hasnut
MCSD, CIW A
Need Low Cost Prefessional Hosting Contact me