Jump to content
xisto Community
Cain1405241557

Mysql - So Hard Come in here if you think MySQL is soo hard

Recommended Posts

Doesn't anybody think MySQL is so hard to code? I mean think about it, you need loads of databases just for one little script and you have to type things in like<MySQL> ;Host-Username: (blahblah) ;Host-Password: (blahblah) ;Host-DatabaseName: (blahblah)</MySQL>Ok, that MySQL code was random, and it is alot harder than that.If you have expierenced it being hard, you are free to post right in here, mate.

Share this post


Link to post
Share on other sites

All codes are hard to begin with. I remember when I first started trying HTML. It was driving me crazy trying to remember everything. Now, I can do it in me sleep!

If you are finding it hard, I suggest reading a book that got me started on MySQL. PHP and MySQL for Dummies is a very easy to read book with good examples and will get you started on MySQL Programming. It also includes PHP so you can start making your own websites.

Share this post


Link to post
Share on other sites

MySQL is easy, for simple stuff, it is very easy even to understand what it does, but when you're getting more advanced with mysql, you see that things can get complicated, especially when you have a fancy database, with joins, dependencies and etc. when writing sql querys is quite hard, but then again.. when you get a lot of knowledge with sql, mysql can get even more easier ;)@ Jimmy89Yeah, HTML in the early days seemed quite interesting, so much things to do, but now when you open some source, it's quite readable, if it's written normally, with tabs and etc. :) Some guys I know, opens the source and says "oh, it seems so complicated, so much tags and characters, this is really a pro work" and when I look at it, it's just simple html, some css and some javascript ;) I am talking about friends in University, who doesn't do any web stuff and similar. :)

Share this post


Link to post
Share on other sites

Most languages are hard at first, lingual or programming, but once you've learnt the basics, you can do anything. And for learning the basics of MySQL, I recommend W3Schools, and of course tizag, both of which I used a lot when I was learning php and mysql.

Share this post


Link to post
Share on other sites

Don't be confused.Don't mix the database, which manages the data, and tle php program, which is a way of making a computer do things for you.Mysql by itself is a database, it's langage is SQL, which is a very simple language. The sql language started from a very simple idea, that data should be organized in such a way that they could be queried using a language very close from the natural language (the "natural language" being obviously the English language).The SQL language, which is the mysql language bug also the Oracle or the Informix or the Ingres language, uses very simple sentences like :select * from people where name like "John"; or :insert into people values ("John", "rich", "stupid"); ordelete * from people where quality="stupid" ; It become more complicated if you want these things to be done by a program, but the complication is coming from the php syntax (if you use php) or even the visual basic syntax if you refer to the last visual basic tutorial at Xisto forum. So, don't mix the database concepts, wich are relationnal ways of organizing the data, with the programming language learning, which is hard for beginners but will seem very simple for you after a couple of weeks/months/years

Share this post


Link to post
Share on other sites

Don't be confused.Don't mix the database, which manages the data, and tle php program, which is a way of making a computer do things for you.
Mysql by itself is a database, it's langage is SQL, which is a very simple language. The sql language started from a very simple idea, that data should be organized in such a way that they could be queried using a language very close from the natural language (the "natural language" being obviously the English language).
The SQL language, which is the mysql language bug also the Oracle or the Informix or the Ingres language, uses very simple sentences like :
select * from people where name like "John";
or :
insert into people values ("John", "rich", "stupid");
or
delete * from people where quality="stupid" ;
It become more complicated if you want these things to be done by a program, but the complication is coming from the php syntax (if you use php) or even the visual basic syntax if you refer to the last visual basic tutorial at Xisto forum.
So, don't mix the database concepts, wich are relationnal ways of organizing the data, with the programming language learning, which is hard for beginners but will seem very simple for you after a couple of weeks/months/years


To nitpick just a tiny bit MySQL is an RDBMS, Relational Database Management System. That said MySQL in and of itself can be fairly basic too extremely complex contingent upon the scope and scale of the database in question.

It is important to distinguish the DB from PHP or what ever language you use. Starting with a solid data model is huge benefit. Having a good grip of ANSI SQL is also very helpful. Thusly my suggestion tends to be to learn what exactly the RDBMS does, what a data model is, then some good SQL. At that point jumping unto PHP is far simpler.

Share this post


Link to post
Share on other sites

First of all, don't confugse the database with the language; MySQL is a freely available database application that you can access using the Structured Query Language (SQL). Working with SQL-databases can be very easy, it goes from:

select * from books
to
select count(*) AS 'aantal', author.name, publisher.name from books inner join author on author.ID = book.authorID, inner join publisher on publisher.ID = books.publisherID group by author.name, publisher.name where books.publisherID = (select publishers.ID from publishers where publishers.name = 'Van In') having count(*) >= 10
and more complex stuff that I don't know (yet) :) . But in fact it's rather easy, just install a database application, learn how to create tables, fill them with data and try some codes, everytime a bit more complex, one step at a time :) .

Share this post


Link to post
Share on other sites

But in fact it's rather easy, just install a database application, learn how to create tables, fill them with data and try some codes, everytime a bit more complex, one step at a time :) .

This is more true than I could probably explain. The only way to understand fully the possibilities of SQL is to play with it. An easy idea to start is to create a database that manages your finances. exclude hard parts to begin with (interest compounding, etc) and focus on just writing a script that withdrawls, a script that deposits, one that transfers money, maintain that database and expand it as you find new things to include. This should give you a general understanding of tables (their properties, how to create and maintain them (select, insert, delete, update statements), as well as queries (select, union, join statements), and when you create functions (scripts etc) you should find yourself a bit more familiar with the concept as it is pretty much the same as writing functions in any other programming language (different syntax of course). From there if you actually LIKE the program you've made (most people do, everyone takes pride in things they make) you could try to automate it by learning about triggers as well as importing data directly from your bank statements (most banks support downloading of records in CSV, Comma Separated Value, format).

Just a thought, I have some ideas for other SQL projects that are easy for beginners if you are interested in learning.

Regards,
the Doc.

P.S. as another note, if there are a decent amount of people that are interested in learning about SQL we could try to get a project going and have a few contributors to maybe make some sweet software. A lot of great programmers started writing code with their buddies online or in a garage.

Share this post


Link to post
Share on other sites

An easy idea to start is to create a database that manages your finances.

And first of all only use phpmyadmin or pure sql in order to create the tables and populate them and start simple queries (select * from mymoney where date < '01/04/08') in order to get familiarized with the SQL syntax first, then create a php program which reads your input from keyboard and then fires the very simple sql query (select sum(money) from mymoney;)

Share this post


Link to post
Share on other sites

it's hard at first but you get use to itnow it's easy peasy but its hard when it dosnt work lol :P data bases are easy in theend as long as you have all the pass words host address ect. :D:(

Share this post


Link to post
Share on other sites

now it's easy peasy but its hard when it dosnt work lol :P

Please try go stay serious, we don't appreciate non-technical terms like "lol" here. :(

data bases are easy in theend as long as you have all the pass words host address ect.

That's the minimum level of security, needing hostnames, usernames and passwords in order to access the data.

Share this post


Link to post
Share on other sites

SQL is actually a very interesting, if old, computer language design. Borrowing from Wikipedia:

During the 1970s, a group at IBM's San Jose research center developed the System R relational database management system, based on the model introduced by Edgar F. Codd in his influential paper, A Relational Model of Data for Large Shared Data Banks. Donald D. Chamberlin and Raymond F. Boyce of IBM subsequently created the Structured English Query Language ...

Note the word shared. If you ever need an environment with really large bandwidth servers, you will be glad you use something based on SQL. It is designed to minimize the data transfer between the database and the requesting computer.

 

In 1989, my wife was working on a Master's in Computer Science, and she jumped at the opportunity to go to a seminar given by Codd. He had just come out with a new book. He was famous in her circles for Codd's 26 Rules of relational database design.

 

She heard he had added a few rules. She wondered, "Was it 30, maybe 36?" It turned out to be 126, and the talk was one of the more opaque she attended (No connection to OpaQue! :( ) Anyway, the bottom-line message is that SQL has been thoroughly studied, and optimized in an environment where data transfer is costly. It is worth using, and MySQL makes it free and easy!

Share this post


Link to post
Share on other sites

Actually to be honest I thought MySQL was pretty easy. Simply connect to a database then you can get all the results simply by using an * and arraying the tables. The only trouble I have ever had (and I’m still having so if you have an answer please tell me) is connecting to a MySQL server from an external location for example a clients download. Other then that I had no problem learning MySQL. You should use this site if you need help with it: here. It is very simple and good to use just for documentation purposes or if you forget the format of something. The only thing to watch out for is MySQL injection or hacks. I believe the website above has a basic solution for them if you are using PHP.

Good luck at learning MySQL and don't forget it is less complicated then you think. By the way one nice thing about MySQL is that it is almost identical in every language ex PHP, Java and C++.

Sparkx

Also wutske I have never seen a MySQL code that complicated... I wish I would have known about the sooner, probably would have made my life a lot easier then when I was trying to loading two or more tables with lots of statements (that was fun...).

yaoersd just a suggestion, try making longer posts, they look better on hosting applets.

Share this post


Link to post
Share on other sites

Just remember it is just hard to think in terms of DBs. Once you get the hang of mysql it becomes really easy. Just learn sql language a little bit and the rest comes easy. If you consider php to handle mysql i would also consider using phpMyAdmin. It works great for creating and managing tables so you can query them later.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.