Forum

Forum breadcrumbs - You are here:ForumGeneral: Chit-chatCreating Views
Please or Register to create posts and topics.

Creating Views

Hello

I have a question about creating some "permanent views".

My purpose is that I will query them from a copy of my database.  My questions is basically if they are dynamic ...meaning the results will updated when that view is accessed.  So for example (see SQL below) -- I didn't want to assume that Sqlite works the way  I have used MySql

CREATE VIEW myview
AS
SELECT PersonID, Sex, Living, Surname, Given, BirthYear, DeathYear
FROM PersonTable
LEFT JOIN NameTable ON (PersonID = OwnerID)
WHERE IsPrimary =1

Ali Christie-Upton has reacted to this post.
Ali Christie-Upton

Also, are they any issues with having many "permanent" views within the RM database? (other than if/when RM was to change the database structure -- which I imagine is not likely).

 

Kevin

Views are stored queries, not stored results. So, every time you open a view or select something from it, it is on the current data.

The only issues with storing Views in the RM database are:

  1. They don't travel with GEDCOM or drag'n'drop
  2. They probably would not travel with an upgrade that modifies the data structure.
  3. You would not want to submit your database to RM Support - they will decline to do anything.
kevync has reacted to this post.
kevync

Perfect - all expected except #3 which I can understand why from their perspective.  I mainly wanted to make sure they were "stored queries" vs. "stored results". Most of them should be items that are not likely to change it 8.version but of course you never know.    Thanks for your quick answer Tom.   Kevin