Well first you have to decide what you are planning to store, what format the data is and how you plan to retrieve it.
Even a flat file database can become quite complex, depending on how and how often you need to access it.
Also the different types of variables in LSL, have different overheads in terms of memory used per value stored, and whilst the additional memory available to MONO compiled scripts is sufficient to offset this in small applications, if you are wanting to optimise your memory use and therefor storage capacity, you have to carefully consider the best method for the problem at hand.
see:

The second issue if where do you wish to store the data? the simple solution is to store the data in the same script that is useing the data, however if you want to store the data in one or more scripts other than the script reading from or writing to the database complexity again increases. If the Storage scripts are in the same object then you will have to communicate with them using LinkMessages, as an object cannot hear itself in chat see:

Lets look at some simple implementations using lists to see if it points you in the right direction.
Probably the simplest for of data storage is the key:value pair method, and can be implemented in LSL in at least 2 forms, namely parallel lists and strided lists. lets say you want to store a list of user names and keys. in the first method you would create 2 lists:
list Key;
list Value;
to add data we would use
Key += [llDetectedName(0)];
Value += [llDetectedKey(0)];
to retrieve a key we could say:
string name = "yevka Laws"
integer Index = llListFindList(Key, Name);
key result = llList2Key(Value, Index);
but that assumes we have a key for that person, what if we don't?
the easiest way is to test the Index as lists in LSL are indexed from 0, if no match is found the index will be -1.
so we can modify the above to read:
string name = "yevka Laws"
integer Index = llListFindList(Key, Name);
if(Index >= 0)
{
key result = llList2Key(Value, Index);
}
else
{
key result = NULL_KEY;
}
second method is a strided list
List Data;
Data += [llDetectedName(0), llDetectedKey(0)];
this time to retrieve we say:
string name = "yevka Laws"
integer Index = llListFindList(Data, Name);
if(Index >= 0)
{
key result = llList2Key(Data, Index + 1);
}
else
{
key result = NULL_KEY;
}
That should give you something to think about and get you started in the right direction.
If I get a chance later, I will try and show you some basic functions that I use to manipulate lists as data.