473,408 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

View with special effects for underlying table

I have the following example table (t1):

userIDEditIter int(10) unsigned primarykey autoincrement
userID int(10) unsigned
userName varchar
userType varchar
userLastEditDateTime DateTime

I would like to have the following view (v1):

userID int(10) unsigned
userName varchar
userType varchar
userLastEditDateTime DateTime

The difference between t1 and v1 would be that v1 would only show the
last record for each userID based on the userLastEdit. However, I would
like the functionality of the view to be such that whenever a query does
an update on the view, the view does an insert into the underlying table
with the lasted info for the particular userID. Thus, the query thinks
that the v1 is a table that only has the last information, while t1
contains the historical data, all transparent to the user. Triggers do
not appear to be implemented for views. While functions could allow for
some of the functionality desired they do not appear to be presentable
to users as tables.

Basically, I want users to be able to treat v1 as a table that can be
added to, deleted from, and updated, but still retain the historical
data in a way that is readily accessible to those with access to the
"backend" tables, in this case, t1. If someone could tell me the
technical term for this I'd be most appreciative.

The whole point of this is to make database access easy for those who
require access to certain information without burdening them with
business requirements that have no direct impact on their work.
Marc
Nov 23 '05 #1
0 1200

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ryan | last post by:
Bit of an obscure one here, so please bear with me. I have two copies of a database which should be identical. Both have a complex view which is identical. I can open the views and the data is as...
2
by: WertmanTheMad | last post by:
MVP's and the like I am looking for suggestions , confirmation Let me start by saying bar none, performance is paramount with the queries to be retured off this view/table query. To that...
2
by: Hennie de Nooijer | last post by:
Because of an error in google or underlying site i can reply on my own issue. Therefore i copied the former entered message in this message....
4
by: stacdab | last post by:
We have a partitioned view with 4 underlying tables. The view and each of the underlying tables are in seperate databases on the same server. Inserts and deletes on the view work fine. We then...
8
by: btober | last post by:
I'm finding that column defaults are not being assigned to nulls when I do an insert by way of a an ON INSERT rule on a view. For example, the following script \set ON_ERROR_STOP ON \c...
6
by: eugenef | last post by:
We are running into the following issue with DB2 V8.1.3 on AIX 5: We have a sample table create table t ( c1 int, c2 varchar(20)) populated with some records: db2 => select * from t C1 ...
2
by: Robert Stearns | last post by:
Can I construct a restricted view and grant select access on it to a user without granting select access to the underlying tables and views? This seems to be an easy way to restrict a user to just...
5
by: Booted Cat | last post by:
I've seen lots of discussions on the proposed inclusion of "function call with named arguments" to C/C++ on these newsgroups. My proposal is slightly different in that: * No ANSI approval is...
3
by: Phung | last post by:
Hi friend ! i want to ask you about view. will the view data be updated automatically when we insert or update the physical table or it is updated when we execute the view ?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.