List:General Discussion« Previous MessageNext Message »
From:mfatene Date:September 3 2005 8:06pm
Subject:Re: question on how to create a subset table
View as plain text  
This is a design question.
the selection of data types must be intergrated to your application.

If you have a table with :
name  type
apple  fruit
red    color

a simple query like
select * from tbl where type ='fruit' will give only fruits to the users.

You can if you have mysql 5.x create a view on this query and even select * from
theview will give only fruits.

Other rdbms implemente what is called snapshots or materialized views wich are
real time (or near it) refreshed.

This is not done till now in mysql.


Selon Raymond Owens <owensr@stripped>:

> I am new to Mysql and am working a project where I want a user to be able to
> see some records but not all records in a particular table.
> I am assuming that I would need to create a subset table based on the
> original table and give the user access to only the subset table.
> Is it possible to do this so that the subset table is updated real time as
> the main table is updated?  In other words as records are put in the original
> table they are also put in the subset table if they meet the filter
> conditions. The filter conditions would be based on the values in certain
> fields. What is the broad overview on how this could be done, I can research
> out the details. .
> example
> say original table looks like this:
> apples        round             red                crunchy
> pears          bellshaped        green        tart
> ford            focus            subcompact    fast
> oranges        round        orange                juicy
> honda        civic                subcompact    classy
> but you don't want a particular user to see any information where the first
> field in the row is a car company. You only want them to see
> the information if it is a fruit. Thanks

question on how to create a subset tableRaymond Owens3 Sep
  • Re: question on how to create a subset tablemfatene3 Sep
  • Re: question on how to create a subset tablePeter Brawley3 Sep