If you’re a creator of scripted content in Second Life, you’ve probably noticed the lack of persistent data storage available for LSL. Storing long-term data is nearly impossible without using an off-world database, but off-world database storage requires knowledge of PHP.
Not anymore.
SL»DB is a small, open-source web application designed to make it simple for you to set up a web database on your own server and send/retrieve data from within Second Life objects with no knowledge of PHP or MySQL.
After a simple, 5-minute setup, you’ll have your own permanent data storage solution that you can easily use in-world any time you’d like with a couple of easy, pre-made custom functions in LSL.
The system is flexible enough for most needs and yet simple to install and use.
DOWNLOAD NOW (.ZIP, 12KB)
REQUIREMENTS
All you need is a PHP/MySQL-equipped web hosting account (such as one you’d set up to run a Wordpress blog). Such inexpensive accounts can typically be found for under $10/mo, and many content creators already have an account like this for their various blogs, forums, or product pages.
If you don't have an account, you can check out providers like Site5 or HostGator. (NOTE: aubreTEC Labs is not affiliated with either of these companies; these are merely given as suggestions).
ADVANTAGES OF OFF-WORLD STORAGE
Here are a few advantages to off-world (web-based) data storage:
- Databases can hold a vast amount of data
- The data is persistent (not affected by script resets or lost objects)
- You can access the same data pool from multiple objects
- Backing up a database is simple and easy
- Database data is portable, and can be moved to new accounts
ADVANTAGES OF SL»DB
There are a few options for storing/retrieving data from the web using Second Life objects. Here are some factors that make SL»DB one of the more useful options:
- No PHP/MySQL knowledge required
- Uses your own database, so you're not forced to rely on others
- Flexible data structure
- Stores/retrieves multiple fields of data in a single request
- Free (as in beer)
HOW SL»DB STORES DATA
Each record stored has three variables: KEY, FIELD, and VALUE.
KEY - The key variable is generally designed to store data by SL user keys or uuids. You can use any unique string as a key value, but that’s what it was designed for.
FIELD - This is an identifier for the data you’re storing (such as “length”)
VALUE - And this is the actual information you want to store (such as “21.5″)
For instance, if you were looking to store a particular object’s length, width, and height, (21.5, 10, 0.1) you would store your data as three records:
[object uuid], length, 21.5
[object uuid], width, 10
[object uuid], height, 0.1
where [object uuid] is the Second Life UUID of that particular object.
If you were looking to store a Second Life user’s favorite color, favorite movie, and favorite singer, you might store it like this:
[user key], color, <1,0,0>
[user key], movie, Boondock Saints
[user key], singer, Neil Diamond
where [user key] is the Second Life key for that particular user.
This is about as flexible a storage solution as we could come up with without getting into your individual needs. If you need something more flexible, you should write your own script (or hire somebody else to).
EXAMPLE USES
The uses for off-world database storage are nearly unlimited, but here are a few examples we can think of:
- Store user preferences for products you sell
- Manage employee timecards
- Store visitor statistics
- Save user statistics for games
- Create a "banking" application and keep track of user balances
- Keep track of user purchases
- Manage product versions for automatic updates
- Store tip amounts from users
- Save object position/rotation details for large builds
- Keep track of roleplay transactions/stats
- Organize clans and tournaments
With a little creativity, an off-world database can dramatically improve your Second Life product or business.
WHAT'S INCLUDED
SL»DB is a web application with a sample LSL script that may be downloaded directly here: http://www.aubretec.com/products/sldb. The download package on that site contains everything you need, but you may deliver this item if you'd like an in-world object you can pass around.
If you deliver this item from XStreet, you'll receive a box in-world which contains an info sheet, the example LSL script, and a link to the download page. The box is merely a vessel for distributing SL»DB within Second Life; you'll still need to download the .zip file from our website.
SUPPORT
Since SL»DB is a free offering, it is not subject to the in-world support offered on other aubreTEC products. To be perfectly frank, it's a pet project of Luc's and our support team has no idea how to fix it or troubleshoot it.


Latest Comments
"I have a comment. YOU SUCK! Hahahaha. "