tags:

views:

90

answers:

3

Hi all. I am a junior year computer science student. I have learned some database stuff (MySql) in my spare time.

This quater, me and three fellow student took up an volunteer work for the University, to develop some websites for them. Our team consists of experienced PHP+MySql developers, and beginners like me.

During our last meeting, we have gone through the user requirement, and we have some rough ideas on how the tables would work.

Then they assign me the job to develop the database using MySql. Also, I got an email today saying I should be "using a database script that would construct the schema".

They dont need me to care about anything about PHP, they only want to be responsible for the database development.

This sounds bit daunting for a MySQL beginner and I am just suddenly stuck on how to get this started. I would be grateful if you guys could give me some help on what software is most suitable for a MySQL beginner, and what does that database script mean?

I would be even thankful if you could give a vivid small example,using some software,to create a table in a database.

Thank you very much.

A MySQL beginner

+7  A: 

I highly recommend this website for designing your database. You can save the XML, generate MySQL code from it. It's great! I agree with the post by mjv, learning the code behind the GUI tool is also a good idea.

MySQL also has a great set of tools called MySQL GUI Tools. They make administering the DB much easier.

W3 schools is also another great resource for learning the SQL basics.

And for a basic "learn MySQL" tutorial, the Tizag one isn't bad.

I assume by script they meant the MySQL statements used to generate the database? The tool at link #1 will let you export that if you click on "Save/Load" and then "Generate SQL".

Good luck! SQL is easy to pick up, and very useful. I would also recommend going a little deeper than the basic "SELECT" statements, and learning about UNIONS, JOINS etc

Matt
+3  A: 

Although you could use various GUI tools such as mySQL Workbench to interface with mySQL, I suggest you get familiar with SQL's Data Definiton Language (DDL), by using it directly in the console application that ships with mySQL (named mySQL monitor, I think) . This part of the SQL language provides all the necessary instructions to create and alter various database objects, from the database themselves to tables, to triggers etc.
One can always use GUIs and other tools to facilitate or automate various tasks, but at first it's probably better to see first hand, what type of SQL instructions are really behind all these tools.

If you haven't had classes on database management systems, you should also maybe read some basic introduction to the relational database model. I can't think of a good reference for this, i.e. something relatively fundamental and simple; the web is full of articles and primers on data modeling, but while these typically provide good information, they often assume the reader is familiar with normal forms and such.
Edit: as often, Wikipedia is a good enough place to start:
Relational Database
Database Normalization
Also the W3C Schools lessons suggested by Matt are also very practical.

mjv
+2  A: 

Set up your database using whatever GUI or web tool you like best (e.g. phpMyAdmin, MySQL GUI tools etc.) then use:

mysqldump --no-data

to turn it into a script that can be run repeatedly. You can check this script into your version control system.

rjmunro