I want to populate a mysql database with basic 'holiday resort' content e.g. name of the resort, description, country. What methods can i use to populate it?
-
The detail of the question is in the tags. – Jan 21 '12 at 12:53
3 Answers
Ok, I know I'm late but I created an application to (create and/or) auto-populate tables. Below is a short demonstration but check it out here if you want.

- 1,429
- 4
- 23
- 46
Where is the content? You can use LOAD DATA INFILE
syntax, or import from a CSV file, or write a script in Java or C++ or C# to parse the file(s) holding the data and populate the database via INSERT
statements. You could hire and intern and make him/her type it all up. If you don't have it in a file, you could write a web-spider to go and get crap from Google and stuff it into the database.
But I can't help you until you tell me where the data is.

- 6,442
- 3
- 27
- 49
First, find the Web sites of one or more holiday companies who offer the destinations you're interested in. You're going to scrape these.
You don't say what language you're using for the implementation, but here is how you might do it in Perl:
- Write a scraper using
LWP::UserAgent
andHTML::TreeBuilder
to explore the site and extract the destination information. - Use
DBI
with theDBD::MySQL
driver to insert the data into your database.
-
I'm not sure on the language at present i am just researching methods of extracting information from holiday websites and storing it within a database. I wanted to ask, if i scrape the information from holiday websites and store it in a database then i use the database in an application to display some of the details, is this illegal? – Rory Lester Jan 21 '12 at 15:27
-
I expect so, unless it's just the name of the resort and the country. If you needed more, you would need to provide your own content. – Jan 23 '12 at 21:53