Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

In this document lesson we explain will review how to associate existent Tables in our DBs and the relation with the different instances depending on the environment that Wayfast users are going to develop the application. Also we describe how to create a new table in SQL and synchronize it into Wayfast 

How to associate an existent Table from Wayfast?

On Wayfast, make sure that the Project is created and at least, a requirement is in “Active” status.

Click explore and associate existing databases objects including tables, stored procedures and functions. We will also showcase Tables related features but the same concepts and features apply to Stored Procedures and Functions.

How to explore Database Tables?

Before getting started make sure you have a Wayfast Project created and a requirement in “Active” status.

First let’s click on “Database” icon at the top headermenu.

...

On In the Submenu, selects click on “Tables” subtab

...

Wayfast automatically shows will display the different Transactional, Master data and Business data tables in grid view dashboard.

Each table type is treated differently when you deploy your application to QA or Production environments.

Type

Description

Transactional Tables

This kind of tables will be synchronized considering only structure. Data will not travel from development environment to other environments.

Master Tables

This kind of tables will be synchronized considering structure and data. This tables are meant for configurations that will not be modified during application’s life unless there is a new App version.

Business Tables

This kind of tables will NOT be synchronized during deployments. This tables are meant to query tables created outside the application development. This can be useful if you are reusing tables from a different system accessing DB directly or if you are dealing with legacy tables.

Log Tables

This tables are meant for app’s tracing features. Data inserted in this table will be automatically cleared after a configurable period.

How to associate Tables from other databases?

Click on “Associating Tables” button

...

Wayfast displays all the Instances and Databases related to the Project. “Object” lookup field retrieves all the “Table” objects that Admin has visibility.

Select any object and click “Assign” button.

...

Now we have the “Table” object associated to the Project and we can continue defining the Requirementsand a popup will be displayed on screen.

...

We need to choose a SQL Server instance and Database to locate the “Object” we want to associate.

Clicking the magnifying glass in the “Object” field will retrieves all the tables available. Keep in mind that if you don’t see an object you recently added to the DB you may need to “Synchronize” the DB with Wayfast.

Select the desired table an click on the “Assign” button.

Now that we associated this “Table” to the Project we are able to see it in the list and use it as part of our project.

...

Info

This feature will work only if we associated another existing database to the Project. If we only have the database created for this project, Wayfast won’t retrieve any other database and their tables.

How to create a new Table in SQL and synchronize it on Wayfast?

Turn to Let’s open SQL Server Management Studio and connect to the DB associated to the Project.

In a new query, create a new table with the following data settings: 

...

Code Block
languagesql
CREATE TABLE EmployeeDemo(
FirstName  NVARCHAR (50)  COLLATE DATABASE_DEFAULT  NULL,
LastName  NVARCHAR (50)  COLLATE DATABASE_DEFAULT  NULL,
Role  NVARCHAR(50)  COLLATE DATABASE_DEFAULT  NULL,
Age  INT  NULL,
)
Info

Wayfast automatically includes an ID field when creating tables as part of the Database framework.

Execute the query and verify that the Table is has been created. Then return to Wayfast and focus on the left navigation bar. Click click on the database menu icon. In the submenu click “SynchronizeDB”.

Click on “End Task” in the “Active” requirement

...

A popup is displayed but we don’t need to end the task, just click on the “Synchronize” button

...

Return to Database-Table submenu

...

Automatically the new row is added on the Transactional Tables grid view with the corresponding “Instance” and “Database” values that Wayfast admin user creates on SQL.Now we are able to see the new table in the “Transactional Tables” grid including related “Instance” and “Database”.

...

Recap

In this documentlesson, we learn learnt how to associate existent tables in our Project’s database. And we We observed how the new tables were created from the in SQL Server Management Studio are synchronized in simple steps into the Wayfast application.  who to synchronize them to make them available in Wayfast. Remember this same steps are applicable for other database objects like views and stored procedures.