Page 1 of 1

What is the relationship between sql views and table relatio

Posted: Fri Oct 11, 2013 1:38 pm
by trevordevore
[This post is an archive from the old SQL Yoga forums]

It looks to me like sql views and table relationships in sqlYoga are doing roughly the same job? Except as I understand it sqlYoga does not create views in the database but dynamically generates their equivalent in code to create sql query statements? Is that right? Are their any speed or other advantages of using views?

NB - put dbconn_get ("last executed sql", connectionName, databaseName) into someSql is not working for me - I am just getting simple output like "SELECT keyword FROM keyword ORDER BY keyword" returned every time. I think it would be great to fix, as then sql delete and create statements could be debugged and translated to online servers etc.

Re: What is the relationship between sql views and table rel

Posted: Fri Oct 11, 2013 1:38 pm
by trevordevore
There is no relation between Views in SQL and SQL Yoga table relationships.

A view might contain a query that joins information from multiple tables but it doesn't have to. See these references:

http://en.wikipedia.org/wiki/View_(database)

http://www.w3schools.com/sql/sql_view.asp

SQL Yoga generates all queries dynamically.

I've made a note about "last executed sql". I'll look into it for the next release. Does the plugin log the statements properly?