Re: Database in-security
Posted in 1991
Path: emory!wupost!sdd.hp.com!hplabs!nsc!pyramid!infmx!aland From: aland@informix.com (Colonel Panic) Newsgroups: comp.databases.informix Summary: think before you post Message-ID: <1991Oct21.084501.2115@informix.com> Date: 21 Oct 91 08:45:01 GMT References: <Available upon request> <1991Oct16.170113.18973@sequent.com> Sender: news@informix.com (Usenet News) Organization: International Brotherhood of Geeks, Local 619 In article <1991Oct16.170113.18973@sequent.com> wyseass@secret.com writes: >In article <1991Oct16.030122.25506@informix.com> aland@informix.com (Colonel Panic) writes: >>In article <1991Oct11.010851.24423@sequent.com> lugnut@sequent.com writes: >>>... >>>You cannot update a view, so set up their sql environ to go at a view >>>and reserve the real tables for the 4gl application... >>> >>>Don "or hire armed guards to watch their every move" Bolton >> >>Not quite true. You can update or insert thru an updateable view. >>An updateable view is a single-table view in which the underlying SELECT > >SINGLE TABLE VIEW? "how quaint" :-) See below... >>statement contains none of the following: >> * DISTINCT or UNIQUE >> * GROUP BY >> * Derived value (virtual column) >> * Aggregate value >> * rowid in the column list >> >>Also, you must have update privilege on the view itself, and the view creator >>must have update privilege on the underlying table. > >THanks for the reminder, all the stuff I've done surpassed the updateable >so I had forgotten there are prticular stances, on specific days, having >specific barometric pressure, with exact windspeeds, coming from a general >direction, that it would work. (if you hold your mouth right). What's your point? This concept of updateable vs. read-only views comes straight out of ANSI. If you have a multitable view, how do you propose to insert into it, for example? Have it spawn inserts into each underlying table? What if you have collisions on primary key values in one or more of the target tables? Insert into the tables you can and ignore those with collisions? How do you update or insert into an aggregate value (e.g. SUM(x))? How do you insert into a constant? How do you insert into a grouped select list? Did you even think about the issues before posting your remarks? I'd suggest reading the section on <view definition> under "Schema Definition Language" (or current equivalent) in the ANSI spec. -- Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland "We log to infinity. It's ours; it's out there; and we need it all. Now!" - Harry Merlo, Louisiana-Pacific Chairman, referring to Mendocino holdings