Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
If you don't have a database currently and want to start using one then there is a lot more that you must/should learn besides SQL. There is a whole science to coming up with a good database schema (table definitions and relationships, normalization, etc.) for a given application.
Also, different database management systems (DBMS) such as SQL*Server, Oracle, MySQL, etc. are very different. They have different data definition languages (DDL) used to define tables and indexes. They are managed differently. They handle transactions differently. They come with different toolsets.
So if you know you are going to be using a particular DBMS such as MySQL, then I'd suggest getting books specific to MySQL so that while you're learning to query the DB using SQL, you can also be learning others specifics (like the DDL) for MySQL.
[edited by: ZydoSEO at 5:59 pm (utc) on Jan. 1, 2008]
From there you can also load any API's for the programming language that you want to use. You then create a local database, add some tables, and begin interacting with it from the language of your choice.
There are hundreds of get started tutorials but generally if you jump right in and learn how to enter select, insert, and update statements by hand you'll pick it up very easily.
All the documentation is here, a book is generally not necessary. As you need to perform a task, you look it up.
Something I found very useful teaching myself from these was that they are command line based rather than going straight into php/mysql. I found it very useful to learn mysql separately to the php commands for accessing mysql databases - rather than just copy/pasting a confusing hodgepodge of code I got my head round how mysql worked before having to worry about the php side of things. It also forces you to learn the fundamentals of admining a mysql server; something you will need.
I currently have my own website, and the hosting plan has mysql databases. So i can have a play on there instead of setting up a server locally. Which i have done, but i've tried and failed getting a database setup..whether it was me or the software i dont know.
But i will get to work on the basics.
instead of setting up a server locally
You really should have mysql running locally if you're going to be working with databases. Quite often you will encounter a situation that should work and there's no reasonable explanation why it's not. You can then use your local computer for a test bed to experiment and debug.
I like to script all my table creation. I plan out the DB, built a text file of all the create table statements, then run the script locally and it builds the tables. If it works without error I repeat the process on the server.
A test bed is not **required** but it sure helps a lot.
one word of warning mysql guides and new developers often take short cuts and teach some questionable practices in database terms.
I learnt SQL and PL/SQl on an Oracle Course (in order to do a new development) :-)
Local colleges often do SQL courses my local one does a range of them and they will hopefully teach a more disciplined approach
Googling for relational databases [google.com] should give you a good range of articles.
I browse Amazon first, find related books on a topic and look at the content sample if they have one, read the reviews, and make a list of books that sound decent - and prices. Then I and search for them at Google Books to see if there's an excerpt online. I've used Google Books to decide against a few and to decide on another, from the sample text they've got combined with reader reviews.
Start by learning the basics of entity relationship modelling."
Can you repeat that in english please?
It's a visual presentation of a database structure. They're used primarily to show the relationships between tables.
You might consider it "flowcharting for databases".
It's very useful, but probably used on 10% of database projects.
I know I seldom do it any more, but that's just because I just have it all locked in my brain.
You usually use a software tool to generate these diagrams, but you can certainly do it with pencil and paper.
I've used ErWin in the past.
MySQL Workbench looks promising (it's new) and there is a free version available.
Another useful technique to learn is "normalization". Basically, means simplifying a database structure into it's simplest, purest, most fundamental form, eliminating redundant data fields in the process.
There's a science to database design, which is probably ignored by 90% of database designers.
Unfortunately, they have crippled the free version ("community edition") beyond usability. And the paid ("standard edition") version is not yet available. The "print" function is reserved for the pay version - boo!
Now, I don't have any problem with companies offering a crippled free trial. But they should be honest, and not call it a "community edition".
Reverse-engineering from a database, and generating a database from the model are also disabled.
They do, at least, permit importing the model from SQL DDL statements. (As well as exporting to DDL.) I tried it on a database I am working on, and was able to produce a pretty ER Diagram in less than a minute. Since my DDL has referential-integrity constraints, it was able to draw the relationships too, so it's a complete ER Diagram, needing only a bit of visual touch-up. Had to drag things around a little to prettyfy it a bit, but that only took a couple of minutes.
So, it looks good, but if you want to use this as a production tool, you will have to pony-up for the paid version - and wait for it's release.