Welcome Guest, Not a member yet? Register   Sign In
Core Auth Library
#43

[eluser]jedd[/eluser]
[quote author="wiredesignz" date="1250475120"]From my experience MySQL VIEW's based on joins are read-only thus inserts or updates are not practical.[/quote]

Hey wiredesignz - yeah, reading through the MySQL 5.0 pages for views is a bit bewildering to me. I get the general idea, but this page is atypically obtuse, I think, compared to the rest of the MySQL documentation.

I gather the change limitation is more to do with views not automatically reflecting table-layout changes to the underlying tables - not something we'd care about, I suspect here.

Bits of the documentation - the FAQ for the views, and things like this quote:

Quote:For a multiple-table updatable view, INSERT can work if it inserts into a single table. DELETE is not supported.

... suggest the option to insert into tables presented by a VIEW is do-able.

For our purposes here, I'd reckon that in the majority of cases we'd be mapping a view over a single extant table.

If we wanted to get sophisticated, we could wrap up the C and possibly U calls into a transaction, and do multiple INSERTS (where we're mapping multiple user tables) sequentially. I suspect the same approach would catch D calls. Reads, obviously, sound pretty painless.


Messages In This Thread
Core Auth Library - by El Forum - 08-12-2009, 08:53 AM
Core Auth Library - by El Forum - 08-12-2009, 10:44 AM
Core Auth Library - by El Forum - 08-12-2009, 11:00 AM
Core Auth Library - by El Forum - 08-12-2009, 11:54 AM
Core Auth Library - by El Forum - 08-12-2009, 12:05 PM
Core Auth Library - by El Forum - 08-12-2009, 12:32 PM
Core Auth Library - by El Forum - 08-12-2009, 12:45 PM
Core Auth Library - by El Forum - 08-12-2009, 12:49 PM
Core Auth Library - by El Forum - 08-12-2009, 01:04 PM
Core Auth Library - by El Forum - 08-12-2009, 01:24 PM
Core Auth Library - by El Forum - 08-12-2009, 03:07 PM
Core Auth Library - by El Forum - 08-12-2009, 05:12 PM
Core Auth Library - by El Forum - 08-12-2009, 06:01 PM
Core Auth Library - by El Forum - 08-12-2009, 06:57 PM
Core Auth Library - by El Forum - 08-12-2009, 07:41 PM
Core Auth Library - by El Forum - 08-12-2009, 08:15 PM
Core Auth Library - by El Forum - 08-13-2009, 07:25 AM
Core Auth Library - by El Forum - 08-14-2009, 02:56 AM
Core Auth Library - by El Forum - 08-14-2009, 04:56 AM
Core Auth Library - by El Forum - 08-14-2009, 08:12 AM
Core Auth Library - by El Forum - 08-14-2009, 08:18 AM
Core Auth Library - by El Forum - 08-14-2009, 08:19 AM
Core Auth Library - by El Forum - 08-14-2009, 08:29 AM
Core Auth Library - by El Forum - 08-14-2009, 08:51 AM
Core Auth Library - by El Forum - 08-14-2009, 09:02 AM
Core Auth Library - by El Forum - 08-14-2009, 09:19 AM
Core Auth Library - by El Forum - 08-14-2009, 09:33 AM
Core Auth Library - by El Forum - 08-14-2009, 11:23 AM
Core Auth Library - by El Forum - 08-14-2009, 11:49 AM
Core Auth Library - by El Forum - 08-14-2009, 12:38 PM
Core Auth Library - by El Forum - 08-14-2009, 12:56 PM
Core Auth Library - by El Forum - 08-14-2009, 01:07 PM
Core Auth Library - by El Forum - 08-14-2009, 01:10 PM
Core Auth Library - by El Forum - 08-14-2009, 02:21 PM
Core Auth Library - by El Forum - 08-14-2009, 06:39 PM
Core Auth Library - by El Forum - 08-16-2009, 01:38 AM
Core Auth Library - by El Forum - 08-16-2009, 06:02 AM
Core Auth Library - by El Forum - 08-16-2009, 09:02 AM
Core Auth Library - by El Forum - 08-16-2009, 11:18 AM
Core Auth Library - by El Forum - 08-16-2009, 01:17 PM
Core Auth Library - by El Forum - 08-16-2009, 01:37 PM
Core Auth Library - by El Forum - 08-16-2009, 03:12 PM
Core Auth Library - by El Forum - 08-16-2009, 04:03 PM
Core Auth Library - by El Forum - 08-16-2009, 06:23 PM
Core Auth Library - by El Forum - 08-16-2009, 07:01 PM
Core Auth Library - by El Forum - 08-21-2009, 01:15 AM
Core Auth Library - by El Forum - 08-21-2009, 05:06 AM
Core Auth Library - by El Forum - 08-22-2009, 07:04 AM
Core Auth Library - by El Forum - 08-22-2009, 07:45 AM
Core Auth Library - by El Forum - 08-22-2009, 04:29 PM
Core Auth Library - by El Forum - 08-22-2009, 07:12 PM
Core Auth Library - by El Forum - 08-23-2009, 05:43 AM
Core Auth Library - by El Forum - 08-24-2009, 06:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB