开发者

rookie question: getting started with MySQL

Apologies if this has been covered elsewhere; I'm new.

I'm trying to self-teach myself SQL and PHP. At this point, I've got basic SQL down as much as I can from just reading about it, and I want to get my hands dirty by creating and 开发者_如何学编程manipulating a database just to see if I know what I'm doing. But I'm a little unclear about how to begin.

1) Do I need to learn PHP first (working on it), or is learning SQL sufficient for me to go create and play around with a database?

2) I'm not sure what program to download. I plan to use MySQL, but I don't want just a command line; I want a graphic interface that lets me see the tables I've created.

I'm not concerned yet with building a website or putting anything online; I just want to make sure I know how to work with SQL. Any suggestions?

Thanks!


MYSQL Workbench is a GUI for the MySQL database.


I suggest trying Ruby on Rails. You'll learn a good modern language (Ruby), a good MVC (Model View Controller) framework (Rails). First Ruby on Rails will hide SQL complexity from you, so that you'll be dealing with data objects and Rails will convert those to SQL. You'll also be able to see what SQL statements Rails generates and learn it by example.

Eventually you'll bump into performance things and will be able to learn how to fine tune SQL for your needs.


  1. You can learn SQL independent of PHP. Starting with SQL is fine for creating and playing around with the database.
  2. Since you mentioned PHP, try PHPMyAdmin. It has a decent interface and if you do stick with PHP can generate code snippets for you.

As far as setting this up, that is another question dependent on your environment setup (local machine, server, platform, etc).


phpMyAdmin has pretty much become the de-facto standard for Web-based MySQL administration. It can pretty much do everything (including run raw queries of all kinds). If you're looking to learn and play around with MySQL, this is a great open-source tool to become familiar with.

The only issue would be setting up a webserver with PHP installed. If you're comfortable doing that, then I'd definitely give this a try.


1) SQL and PHP can be used seperately. Personally, I would learn them a little bit each on their own and then work on combining them.

2) For software, I would install XAMPP (http://www.apachefriends.org/en/xampp.html). This includes the ability to run PHP code as well as has a MySQL database. It's great for getting started with server-side languages and allows you to emulate everything so you don't need a real server.


  1. You don't need PHP for learning SQL. MySQL can pretty much function on its own or with another programming language.

  2. You can use a free GUI for accessing MySQL. I recommend SQLyog


You dont need to learn PHP if you want to just create and play around with database.

For visual experience with database design, try your hands on MySQL workbench, Its a great practical visual database tool.


First, the basics: PHP is a scripting language, almost always used to create pages on websites. SQL is a language to talk to databases.

You don't need to learn anything but SQL to play with the database. No PHP, Ruby, C, Java, nothing. Plain simple SQL is everything you need IF you only want to play with a database.

For a front-end, there's a lot of alternatives: PHPMyAdmin, MySQL Workbench, SQLyog, HeidiSQL. Use them to view if the table/query is ok, not to do the work for you. Relaying on them to do everything will teach you how to use the frontend, not how to use SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜