How to use studio?

Databases

Add, open, back up, convert, copy, rename and share databases in the agdb studio

The Databases page (/studio/db) lists every database you own or that is shared with you.

Add a database

The Add Database form at the top takes a Name and a Type:

TypeMeaning
MemoryMemory only, basically a cache. The data is lost when the server stops, unless it has a backup: then it starts from the backup. The default.
MappedMemory mapped file: reads from memory, changes are written to the disk.
FileFile only: reads and writes go to the disk, no memory caching. Uses the least memory.

See storage for the details of each type. A new database is always owned by the user who adds it. You can change the type later with Convert.

The refresh button next to the form reloads the list.

The database table

ColumnMeaning
RoleYour role on the database: admin, write or read
OwnerThe user who owns the database
NameThe name of the database
Typememory, file or mapped
SizeSize of the database in bytes
BackupDate and time of the last backup, or N/A

Click a column header to sort by it: ascending, descending, then back to unsorted. Click a row (or press Enter on it) to open the query page of that database. The chevron at the end of the row opens the users of the database.

The Export menu above the table downloads the rows as CSV or JSON, or prints them (see Export and print).

Database actions

The actions menu of a row shows only the actions your role allows. The ones that delete or overwrite data, including Backup, are at the bottom, below a line. Most of them ask you to confirm first.

ActionWho can use itWhat it does
Auditany roleShows the audit log of the database: when, who and which query changed it.
Backupadmin roleBacks up the database. An existing backup is replaced.
Clear → All, Db only, Audit only, Backup onlyadmin roleEmpties the database, its audit log, its backup, or all of them.
Convert → Memory, File, Mappedadmin roleChanges the type of the database.
Copyany roleCopies the database under a new Name. The copy is yours.
Optimizewrite or admin rolePacks the database file, reclaiming unused space.
RenameownerGives the database a new Name.
Rollbackadmin roleSwaps the database with its backup: the backup becomes the database and the database becomes the backup (Memory databases keep the backup).
Restoreadmin roleReplaces the database with its backup and keeps the backup.
RemoveownerDisconnects the database from the server. The files stay on the disk.
DeleteownerDeletes the database and its files permanently. You have to type the database name to confirm.
Delete cannot be undone. Use Remove if you only want the database out of the list.

Share a database

Open the users panel with the chevron at the end of the row. It lists the users of the database grouped by role, with a Filter users... box. Large groups show the first 10 users and a +N more link.

RoleThe user can
Adminread, change, back up, convert and clear the database, and add and remove its users
Read/Writeread and change the data, optimize the database
Read Onlyread the data, see the audit log, copy the database

Users with the admin role can:

  • add a user with the + button: a Username and a Role,
  • change a user's role by clicking the username,
  • remove a user with the remove button next to the name.

The owner always has the admin role and cannot be changed or removed. A shared database shows up on the other user's Databases page with their role in the Role column.

The server admin sees and manages every database of the server on the admin pages.