In this video tutorial, we‘ll install Postgres as the DBMS to work with YAWL. With YAWL, you can also use MySQL or Microsoft SQL Server, DB2 or Oracle. In the Postgres DBMS we‘ll set up two databases: - One for the YAWL system itself - The other for the application data For a productive system, you would want the YAWL DB to reside in a DBMS where regular backups are performed by your database administrators. Supplementary files can be found in the zip file below.
Welcome to another YAWL tutorial! We'll install Postgres as the database management system to work with YAWL. With YAWL you can also use MySQL or Microsoft SQL Server, DB2 or Oracle. In the Postgres database management system, we'll set up two databases: one for the YAWL system itself and the other for the application data. For a productive system you would want the YAWL database to reside in a database management system where regular backups are performed by your database administrators. We proceed in four steps: first we install Postgres, second we set up users and databases, third we install database drivers and four we adapt the hibernate properties of YAWL. Let's go to the computer. Okay, to spare you the lengthy process of seeing me install Postgres on my machine I'll just show you the steps that need to be done and I'll show you the results when they're ready. So, the first thing is: we need to download Postgres and install it. You can see here the URL of the Postgres download page. You just choose your operating system and then you follow the instructions. That should be very easy. Then, once it's installed, you can invoke the pgAdmin interface. This is running in a browser right now in the latest version and you just open it here and you can see all the servers and first you have to create two users for our purpose. One of them is called yawl. The user yawl also has the password yawl. So, it's exactly as a username and the second user we create is called wfms and it also has password wfms. Then we create the two databases. One of them is the YAWL database. The YAWL database is created here. I just show you the properties I have already done that. It has the name yawl and the owner of the database is yawl, the user we have just created. And once you have followed the whole tutorial to the end, this database will be populated automatically when you start the YAWL server. The second database we create is called customers. In the customers database, we create a new table under schemas public and tables here and this table we call it cust. And if we click on the properties here, we have two columns. One column is called id. This is of data type bigint and this should not be null and this is our primary key and the second column is called name and it's a character varying then we fill the customers table with values. So, we go to view edit data all rows and I have already entered two rows of data here. So, we have one id. One is Jack and id two is Joe. So, this is just our initial set of values in the database. The next thing is, we have to install the database drivers. You can find the drivers in the supplementary material and you have to put the driver in this directory so it is in the YAWL installation wherever you have that on your machine. Engine Apache Tomcat YAWL lib. That is the directory. The driver is called postgresql 42219 jar. This is the current driver at the moment and you put it in this directory. This driver is also incorporated in the supplementary material and the other thing is now the hibernate properties file. You can find the hibernate properties file in this same YAWL lib directory here and when you open it it's open here in this window below. You just have to comment out the standard database for YAWL. This is the h2 database and replace that by the settings for the postgres database. And also the hibernate properties file is in the supplementary material. Just note that here, we have the connection to the YAWL database. The username is yawl and the password is yawl. That's all, If you just want to use Postgres for the YAWL database. If you want to know how to communicate with the database from YAWL then go to the next video.