Home » Community » Forums » » SQL in 60 Seconds
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 SQL in 60 Seconds
Post Reply 
Nice starter article. Maybe a follow up article would be how to access a SQL database from C++, be it MySQL or something similar.

 User Rating: 1015    Report this Post to a Moderator | Link

hey great articel.... I learned the basics really fast and now I'm fit for fight for my the DB I'm creating for school :D

quote:
Original post by Anonymous Poster
Nice starter article. Maybe a follow up article would be how to access a SQL database from C++, be it MySQL or something similar.

yes indeed.... that would make a great ariticel, I'm just learning C++ and haven't got a clue of how to make the link between ODBC and C++ but I would love to find out :D

great work

 User Rating: 1030   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Anonymous Poster
Nice starter article. Maybe a follow up article would be how to access a SQL database from C++, be it MySQL or something similar.


Check out Nehe's screensaver tutorial for info on how to connect to a MySQL database with C++ and also how to use SQL to create the tables.

 User Rating: 1263   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Actually the MySQL FAQ points out that it is pronounced ess-queue-elle, not sequel which is a common mistake. So I think you could really go either way with that one.

 User Rating: 1015    Report this Post to a Moderator | Link

quote:
Original post by Anonymous Poster
Actually the MySQL FAQ points out that it is pronounced ess-queue-elle, not sequel which is a common mistake. So I think you could really go either way with that one.

He points out that SQL (the language) is pronounced 'sequel' but he says nothing about MySQL (the database program), wich is indeed pronounced my-ess-queue-elle. Not that it matters ;-) Nice article though.

 User Rating: 1015    Report this Post to a Moderator | Link

I myself being in a database delevepment enviroment, would warn against ambiguous names for fields.

Such as ID.... you have the same name in 2 tables. This causes confusion when joining the tables as which is the primary key...
and what the relationship is....

It would be a good idea to name them the same across tables.

The big distinction between types of databases apps that were stated. is that MS access is limited in every aspect. such as limits on how many users can connect to it. (20 if you were wondering). Its lack of being able to index the tables. Any good database app allows the programmer to add indexes to speed queries. Useful on joins and where clauses. Not to mention the ablity to use triggers and stored procedures. Stored procedures are great for adding,deleting or updating the table. They are fast, the database creates planned execution path tree for them. Doesn't have to be parsed, furthermore they can execute more than one statement at once.

Triggers are the more advanced version of stored procedures as they have are called when an event is fired on a table. they can be used on any of the following events: update,insert or delete.
They also can perform any valid SQL statement that you might need. like SQL 7.0 you would write them to delete relational data from other tables when the primary key was deleted. (2000 introduced cascading deletes,updates takes care of this for you.)

orcale being the fastest that I have seen tho.



 User Rating: 1016   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks for the comments everybody, nice to see somebody that actually benefit from the article :-)

You're all right in your various commentary, I may have a different standard and I may have skipped triggers etc (on purpose), but at least I awoke the interest for SQL and the possibilities to use it in your active development.

I hope you eager for more information. I can say I won't give it to you because I don't think I'm the right person to go into real depth in this subject, I'm only a daily user, and since I'm a access junkie from the beginning, stored procedures etc isn't my brand, although, I read about it in school :-)

I'm also hoping that perhaps I've given some kind of birth to new articles in this area, not only descibing how to do various 3d stuff, because game programming and various applications programming often requires more than that :-)

Thank you
Albert "thec" Sandberg

 User Rating: 1075   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: