Just doing some revision, and one of the questions is:
"Explain what is meant by 'query modification' as an approach to implementing views."
Now, I'm not quite sure how to answer that... I know what views are, how to create them and why they are used etc, but what exactly does that question want to know?
1. is the modification by a search of a previous query. Learn more in: Query Log Analysis for Adaptive Dialogue-Driven Search.
To modify your query: To modify your query, you must enter Design view, the view you used when creating it. There are two ways to switch to Design view: On the Home tab of the Ribbon, click the View command. Select Design View from the drop-down menu that appears.
These are the types of views that are defined by the users. There are two types under User Defined views, Simple View and Complex View.
In Object Explorer, expand the database that contains the view and then expand Views. Right-click the view and select Edit Top 200 Rows. You may need to modify the SELECT statement in the SQL pane to return the rows to be modified. In the Results pane, locate the row to be changed or deleted.
This is a theoretical concept from David Meier's works on relational theory.
When you are using a view in your queries, like this:
CREATE VIEW v_filtered
AS
SELECT *
FROM mytable
WHERE mycolumn = 1
SELECT *
FROM v_filtered
JOIN othertable
ON otherid = myid
, to execute your query, a database engine should be able to rewrite the query over the virtual relations (like your view) to one using the base relations, since that what is actually stored:
SELECT *
FROM mytable
JOIN othertable
ON otherid = myid
WHERE mycolumn = 1
This process is called query modification.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With