Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Mariposa Bot Shipped With Vodafone Smartphone

IT Job Market Heating Up: Report

Bing Makes Strides But Momentum Stalls

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2







Java Developer (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

SQL Etc

August 30, 1999

Using a flat-file database in Perl

By Jason Shindler

A Poor Man's Database

Huh? What's that?

You've all heard of a Poor Man's Copyright: when you come up with a great idea and you send it to yourself in the mail to prove it was your idea. Getting a real copyright can be a pain, and sometimes isn't worth the effort. A poor man's copyright doesn't have all of the benefits of a "real" one, but for the small stuff - it usually gets the job done.

When designing a website, the same sort of problem can arise, you have a project that needs a database setup, but you either don't have the money for a database package, or it's such a small database, that using a commercial package isn't worth the trouble.

Here's one such scenario: I was designing a site for two movie theaters in Georgia. They wanted their movie showtimes on their site, with a link to the movie's website, a picture, a rating, etc. I tried doing it the old fashioned HTML way, but I found that I was typing in the same information over and over, (after all, Kate Winslet is always a star of Titanic). They change the showtimes 2 or 3 times a week, so I found myself typing in that information too many times. The approximately 10 movies a week certainly didn't merit a Microsoft SQL or Oracle. So I decided to use a series of small text files as a database instead.

Why Perl?

Perl is an interpreted language that's available on most web server packages. It's not platform or operating system dependent, and it's easy to learn and use.

OK-This is a great idea. What do I need?

The recipe calls for 2 cups of sugar, 2 ounces of chocolate and...

  • 1 web server with FTP access: It must have CGI and Perl capabilities (most modern web servers do). A "small business" account from an ISP will generally work, Geocities, Tripod or Angelfire accounts will not; they don't have CGI access. A note about Windows NT IIS servers -- your server's administrator may need to add the Perl language to the server. A free copy can be downloaded from ActiveState Tool Corp
  • 1 copy of WS-FTP, or another FTP program that supports CHMOD. All scripts will need to be set to "7-5-5" which means you should check all boxes in the owner column, and the read and execute box in the group and other columns.
  • 1 copy of CGI-LIB.PL. This is a Perl library that will make your HTML forms useable in a Perl Script.
  • Knowledge of a programming language: You don't need to know Perl, but this article assumes that you know variables and loops and other common programming concepts.
  • Know where the Perl program is located on your web server. Also know the path to your documents. A quick email to your system operator should get you these pieces of information. Still not sure? There's more information about this later on in this article. A note about Windows NT IIS servers -- on a properly configured NT server, knowing where Perl is located is not necessary


Go to page: 1  2  3  4  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

SQL etc Archives








Latest Forum Threads
SQL etc Forum
Topic By Replies Updated
help with joining table and view stong 1 March 16th, 07:20 AM
return null when where has no result bugmenot1 0 March 15th, 06:17 AM
What does * mean tonyd 1 March 11th, 09:07 AM
Searching by time and grouping by numer padstar 4 February 22nd, 02:01 PM









The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers