Page 1 of 1

Accessing data from a Related Table using Appery

Posted: Mon Feb 10, 2014 9:12 pm
by Shailvi Tyagi Wakhlu

Hello,

I had a question regarding access to data from a related table. I am using an external database, and connecting using a rest api service, which is working fine in all other cases. Assume there are 2 tables:

1) "User_Test": This contains a test_id for the test conducted for a user.
2) "Test_List": This contains a list of all tests. The primary key here (id) is the same as test_id in the "User_Test" table. There is a one to many relation between "Test_List" and "User_Test"

Goal : I would like to display the LIST of all corresponding "test_list" names for all "user_test" records, and not just the ID which is stored in "user_test" table.

While it is easy to get and display the related table data in a web application, its not entirely obvious how to do that here.

Can you suggest how this can be accomplished? Thanks!


Accessing data from a Related Table using Appery

Posted: Mon Feb 10, 2014 9:51 pm
by Bad Addy

If you are using any type of relational table (SQL etc), perhaps a 'view' would be better. I cannot think how REST could manage your goal? Also need to consider the load it would carry.

Just an idea :)


Accessing data from a Related Table using Appery

Posted: Mon Feb 10, 2014 10:00 pm
by Kateryna Grynko

Hello,

You should do this on your side (Database server) and return a ready JSON/XML to Appery.io. Everything depends on your Database structure.