Posted 14 April 2013 - 02:32 AM
Hi
I'm making a program for a new server which provides a database storing information about players. I'm just writing the program now, and I'm trying to interact with the stored data, read and change it, and I've encountered a problem.
I'm basically serializing a table and saving it to a file. If I want to modify part of the table, appending or changing, currently I just read the current database to a table, modify that, then re-write the table to the file. However, this database has the potential to be quite big, and if I use that method it could be much more taxing than any other method. What I'm looking for is a way to access and modify elements of the serialized data without opening and rewriting the whole thing each operation.
If there's a better way of storing this data so it can be modified in the way I want, I am happy to look into that, although the server owner wants it to all be done through computercraft, rather than having an SQL database or something running on the server box too.
This is quite an advanced topic, hopefully you understand what I'm asking for!
Many thanks,
singul4r1ty
I'm making a program for a new server which provides a database storing information about players. I'm just writing the program now, and I'm trying to interact with the stored data, read and change it, and I've encountered a problem.
I'm basically serializing a table and saving it to a file. If I want to modify part of the table, appending or changing, currently I just read the current database to a table, modify that, then re-write the table to the file. However, this database has the potential to be quite big, and if I use that method it could be much more taxing than any other method. What I'm looking for is a way to access and modify elements of the serialized data without opening and rewriting the whole thing each operation.
If there's a better way of storing this data so it can be modified in the way I want, I am happy to look into that, although the server owner wants it to all be done through computercraft, rather than having an SQL database or something running on the server box too.
This is quite an advanced topic, hopefully you understand what I'm asking for!
Many thanks,
singul4r1ty