You may right that I've explained it a little bit bad.
But it's hard to show the functionality of a data-management system in a video, image or something else.
You also said that you've never worked with sql so far, so it may also hard for you to imagine what you could use a database for - and how.
So I will try to make an example for you and all the others who haven't worked with sql or database so far to better understand the possibilites:
Imagine you've developed a game with, let's say, 20 levels. You now want to create highscores for this game.
Normally, you would now (probably) create for the highscores of every level a individual text file, and save them there, or may you would use the engine game_save and save the scores in different arrays.
As you may know, you've to sort the highscores, which often is confusing.
So now let us imagine you would do this in a database.
So what you would do first, create a database, and create a table highscores which could have columns like name (the name of the player), score (the points), level (which level the score is related do).
A sql creation could look like this: CREATE TABLE highscores (name,score,level)
You now have a simple structure for your scores. And you could insert all scores for every level in the same way, no need to implement different files, arrays, or whatever.
A sql insert of scores may look like this:
INSERT INTO highscores VALUES ('name_of_player',score_value,current_level)
After you've insert all the data, you don't need to worry whether you've saved the data correctly, the database will do this for you. Also, you don't even have to think about sorting or filtering.
Well, after that, of course you want to show the highscores for each level. That's quite simple since you've saved it in a database.
What do you have to do? Say the database that you want to get all the names and scores from the database - sorted by the score of course.
In a sql-expression this would look like:
SELECT name,score FROM highscores WHERE level = level_to_show ORDER BY score DESC BINARY
What does this mean? SELECT means to get some data from the database, following the fields from the table you want to get. In our example, we want to get the player name and the score. Now we have to say that we want the data from "highscores". The WHERE means that we just want to get all scores from the specific level. Now we just have to say that we want sort the whole data by the score, DESC means descending and BINARY means that we want to order it numerical, and not string-based.
This is just one of thousand examples, you could also manage all your configurations for each player-profile in a global table.
And the best of all: You just have to use one file to save all the information, forget about individual text files.
And of course, you can also easily change/edit all or specific values, delete values or whole tables, change fields of the table and much more, without worrying to code something complicated therefore.
Because InLite doesn't recognize data-types, you can easily get the data in a char-array, just look at the example in the packed download to see how it works.
I hope this may help you to understand some of the benefits and usages of a database. Maybe someone other who also has some experience in databases can explain this a bit better.
Regards
TSGames
Last edited by TSG_Torsten; 12/05/09 22:43.