Prerequisite: Make sure that you have mysql or oracle install. Here is instruction https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/
Currently sling comes out of the box with Tar and Mongo persistent manager but setting up RDBMS instruction is hard to find.
Note that sling underneath has Oak for data persistence and OAK does support different type of RDB persistence that you can get it from here. https://jackrabbit.apache.org/oak/docs/nodestore/document/rdb-document-store.html
Here are steps to set up RDB persistence for sling.
Step 1: Checkout sling project from https://sling.apache.org/downloads.cgi
git clone https://github.com/apache/sling-org-apache-sling-starter.git
git clone https://github.com/apache/sling-org-apache-sling-app-cms.git
Step 2: find oak.txt either under src/main/provisioning or builder/src/main/provisioning
Step 3: Add the following lines in oak.txt
[artifacts startLevel=15 runModes=oak_rdb]
Step 4: Find boot.txt which is under the same folder where oak.txt was and append the following in property sling.run.mode.install.options