List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 18 1999 1:35pm
Subject:Re: MySql Tables
View as plain text  
>Hi,
>Sorry for yet another newbie question. I am setting up a database where
>all the "records" will contain the same information, name address, tel
>number etc etc etc, do I need to set up a table for each individual record
>on the database, or can I simply make one template and use that to input
>the information via a web site.?

Using a separate table per record would quickly overwhelm you because
you'd never be able to find what you want.  The basic idea in a relational
database like MySQL is that everything is represented as a table, and a
table consists of rows and columns.  Each row represents a a record (the
information for one individual in your case), and the columns represent
the fields of the records (name, address, telephone, etc., in your case).

The "template" will be the CREATE TABLE statement that you use to create
the table - it will specify the tables columns, i.e., the fields you're
interested in recording.

>I've looked on the MySql tutorial but can't seem to find the answer. I
>want to make a database where people can input their own details, if so
>desired.

That's an entirely different question.  You should probably figure out
how you want to create your table first, then get used to using INSERT,
SELECT, etc. from the mysql client program so you get the idea of the
SQL statements you'll be using to access your table.  Then you'll need
to write some sort of Web-based script to convert the contents of a
form in a Web page into similar queries that run from the script.  Perl/DBI
and PHP are reasonable candidate scripting languages, though there are
others.

--
Paul DuBois, paul@stripped
Thread
MySql Tablesmark18 Sep
  • Re: MySql TablesPaul DuBois18 Sep
  • Re: MySql TablesCraig Oettle18 Sep