A couple quick sql questions joins - cascade - foreign keys etc

Although I usually write sql statements everyday and consider myself to do fairly well with joins,unions etc. I still run into things alot that I have to “look up” and find out what they are doing. Recently I ran into a cascade function that deleted all of a records siblings when a single parent record was deleted which is un doubtedly awesome. But that has just led me to thinking if there are more possibilities that i am missing.

The first question would be “Is their a way to automatically join a table?”

for instance if I had 1 table that was only textslugs and ids, can i add a constraint to another table with a foreign key or whatever to automatically fetch the text its textId corresponds to?

And with the same table scenario, can I insert records into a table and use foreign keys or constraints or whatever to automatically update other tables;

I am just looking for possibilitys and possibly pointed in the right direction towards either one of the above actions.

Sorry for using any of the wrong terminoligy or not wording things properly, with all of the things google has taught me over the years communicating well wasnt one of them.

no, sorry – except if you “pre-join” them with a view that you define

no, sorry – except if you write a trigger

:frowning:

thank you though