Publish a version
Submit a package to your database, inspect its contract, then activate the version your application will use.
Define tables and the functions that use them in DBL. AppDB gives your application a typed API and runs each call as a database transaction.

The database language
A DBL package holds your schema and the operations your app can call. Here, a unique index keeps email addresses distinct. The exported write function creates a user in one transaction.
Download the DBL examplenamespace people;
table User {
id: UInt8,
email: Text,
primary key(id),
unique index by_email {
key: (email),
value: {id},
},
}
export write fn create_user(id: UInt8, email: Text) -> () {
User.insert({
id: id,
email: email,
});
}
Working with AppDB
Submit a package to your database, inspect its contract, then activate the version your application will use.
Generate client methods from your exported functions. Your application can pass typed arguments and receive results from that package version.
Connect over HTTPS using the database’s own hostname. AppDB checks the caller’s credentials and permissions before running the operation.