Multiple Child tables per Parent table

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
urichard
Veteran Member
Posts: 87
Joined: 2018-11-01 12:11

Multiple Child tables per Parent table

Post by urichard » 2018-11-21 21:21

i want to have a single table hold all the records of multiple other tables for example the main table is called products and then there is 3 other tables that are linked as child tables and every time there is a new record added , edited or deleted on these other 3 tables it will do the same to this main table?

How do i do this if it is possible i hope it is possible to have more than one child table for a parent table if i lets say have 10 child tables that must all be added into the parent table

Kind Regards
[email protected][/color]

Kind Regards
Richard

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Multiple Child tables per Parent table

Post by pbottcher » 2018-11-22 06:28

Hi,

why dont you use a view, rather than replicate all information from the childs?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
urichard
Veteran Member
Posts: 87
Joined: 2018-11-01 12:11

Re: Multiple Child tables per Parent table

Post by urichard » 2018-11-22 08:52

Ok how do i do that? im very new to appgini, maybe if you can just direct me with an example or link please?
[email protected][/color]

Kind Regards
Richard

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Multiple Child tables per Parent table

Post by pbottcher » 2018-11-22 12:21

Hi,

what you need to do is to create a table (through AppGini), let call ist my_view. Next you specify all the fields that you want to have in this table (which would be the sum of your child tables) and generate your app.
Now you need to go to your database, drop the table (my_view) and create a view call my_view with exactly the same fields that you have created via AppGini that holds all your child data.
Like this you have the my_view table accessible with all the data you wanted. You need to verify if you can alter the entries in the table, this depends on your structure. To be on the save side, you should only alter the data in the original tables.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply