I need an education in SQL [message #444430] |
Mon, 28 February 2011 03:26 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I have a very limited understanding of databases and how to interact with them. At my place of work the Database Admins have servers running Microsoft SQL server 2005/2008.
I manage software that interacts with some of the databases on these servers which does so through an OBDC connection which I had to set up on the Application server.
However, I also sometimes view the tables on the databases using Microsoft sql server management studio 2005.
I'll log in using SQL server authentification rather than my windows credentials (as worryingly they actually let me have SA rights (well, the applications server needed SA to create the database, so I use that)).
Screenshot is a random google image
Then I'll browse to databases->the database I want->tables then I view the table...
I set up an ODBC connection on my client PC and sometimes view the databases in Microsoft Access instead, as I find setting up views easier that way.
This is the entire extent of my database knowledge. I do know how to run SQL queries, but I do not actually know any SQL queries.
What the fuck has any of this rambling got to do with renegade modding?
I want to know how to create a plugin that will interact with a database. I need to know how to install the database server, which database server software most people use, and I need to know how to create my tables, access data, modify data, write data, compare "cells", close the connection properly, pretty much everything.
Is there anyone willing to help?
What would be really fucking awesome would be a tutorial using the SSGM plugin.
The tutorial would ideally include how to install the DB software, then proceed to demonstrate in the plugn how to connect to the database and handle errors (like the db doesnt exist), how to create the table and set up the headings (if they do not exist) via the plugin itself. Then how to write some data and read some data, and modify some data too.
[Updated on: Mon, 28 February 2011 03:26] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: I need an education in SQL [message #444503 is a reply to message #444430] |
Tue, 01 March 2011 11:11 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
If your interested in using SQLite you might want to look at the BRenBot source code, since that uses SQLite for it's database.
Of course, that's written in Perl... but you will be able to get pointers on the SQL side of things.
[Updated on: Tue, 01 March 2011 11:11] Report message to a moderator
|
|
|
Re: I need an education in SQL [message #444505 is a reply to message #444503] |
Tue, 01 March 2011 11:55 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
jnz wrote on Tue, 01 March 2011 13:07 |
reborn wrote on Tue, 01 March 2011 18:03 |
Thank you, I will start googling, I guess.
|
Google will turn up some good results but there are some good pointers in the link above
|
SQLite definately seems like the way to go, it's built into the application and you get the source code, no database server needed, it's just part of the app. Feeling it.
I just compiled a dummy plugin with the sqlite header file and .c file. Doesn't actually do anything yet, but it's nice to have it compile without errors and start diving in.
Looking through the site now.
danpaul88 wrote on Tue, 01 March 2011 13:11 | If your interested in using SQLite you might want to look at the BRenBot source code, since that uses SQLite for it's database.
Of course, that's written in Perl... but you will be able to get pointers on the SQL side of things.
|
Thank you, I will take a look.
|
|
|
|
|
|
|
Re: I need an education in SQL [message #446574 is a reply to message #444430] |
Thu, 05 May 2011 14:06 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Did you make any progress with this, Reborn? I'm gonna play around with SQLite soon and I wonder if you found any interesting/resourceful links or software libraries. WxSQLite3 is a wrapper that uses WxWidgets' data types, and YaRR also contains a wrapper for SQLite. I found a tutorial on the SQLite written in 2007. Haven't really searched for stuff though.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Thu, 05 May 2011 14:07] Report message to a moderator
|
|
|
Re: I need an education in SQL [message #446580 is a reply to message #444430] |
Thu, 05 May 2011 15:03 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I found the easysqlite wrapper most easy to use. I never went anywhere with it though as the project I had in mind soon became boring to me. I actually didn't go much further than what I posted in this thread.
|
|
|
|
Re: I need an education in SQL [message #446880 is a reply to message #446777] |
Mon, 09 May 2011 16:49 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
bmruze wrote on Mon, 09 May 2011 03:26 | I am pretty sure that somewhere in these forums some source code was posted, by someone who used SQL in their build of SSGM, I'll do some looking and see what I can find. If I remember correctly they used it for their commander based system but looking at what they did could help you out a little.
Once again I'll do some looking around to see if I can find it.
|
I'd appreciate that.
btw, how's your identical twin brother?
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|