What is the relationship between sql views and table relatio

This is the place to post technical queries about SQL Yoga

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, trevordevore

Post Reply
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

What is the relationship between sql views and table relatio

Post by trevordevore » Fri Oct 11, 2013 1:38 pm

[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.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

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

Post by trevordevore » Fri Oct 11, 2013 1:38 pm

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?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “SQL Yoga”