Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Training: Day Three - Persistence

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Training: Day Three - Persistence

This is the third in our four part training sessions introducing FenixEdu development for new collaborators.

In this third session, we introduce our persistence technology and database engine as well how to commit database changes to version control.

Avatar for Artur Ventura

Artur Ventura

October 14, 2013

More Decks by Artur Ventura

Other Decks in Technology

Transcript

  1. Fenix Framework • Software Transactional Machine • Developed in part

    by our Team • Available at: ◦ https://github.com/fenix-framework/fenix-framework
  2. Fenix Framework class PendingRequest { DateTime generationDate; String url; Boolean

    post; String buildVersion; } relation PendingRequestRootDomainObject { RootDomainObject playsRole rootDomainObject; PendingRequest playsRole pendingRequest { multiplicity *; } } DML
  3. Fenix Framework DML valueType java.math.BigDecimal as BigDecimal { externalizeWith {

    String toString(); } } enum net.sourceforge.fenixedu.util.WeekDay as WeekDay;
  4. Fenix Framework Transactions • Use @Atomic • Can be READ,

    WRITE, SPECULATIVE_READ • DO NOT USE IN ACTIONS!
  5. Fenix Framework Fenix Domain Browser • Available at: ◦ https://fenix-ashes.ist.utl.pt/fdb/

    • Source code at: ◦ https://github.com/nurv/Fenix-Domain-Browser • Demo:
  6. Fenix Framework Changes • Edit domain_model.dml. • Run mvn clean

    test -PSQLUpdateGenerator • Edit /etc/database_operations/updates.sql • Rename updates.sql • Edit /etc/database_operations/run • Run /etc/database_operations/run
  7. MySQL • You are going to run the database in

    a remote server. • How to connect: ◦ ssh -A -fNg -L <localport>:localhost:3306 [email protected] ◦ mysql -h localhost -u<istid> --protocol=TCP -P <localport> -p<dbpass> <istid>_fenix -A