chapter04

chapter04 - Concepts of Database Management, Fifth Edition...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Concepts of Database  Concepts of Database  Management, Fifth Edition Management, Fifth Edition Chapter 4:  Chapter 4:  The Relational Model 3: The Relational Model 3: Advanced Topics  Advanced Topics 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Objectives Define, describe, and use views Use indexes to improve database performance Examine the security features of a database management system (DBMS) Discuss entity, referential, and legal-values integrity Make changes to the structure of a relational database Define and use the system catalog
Background image of page 2
3 Views Application program’s or individual user’s picture of the database Less involved than full database Offers simplification Provides measure of security Sensitive tables or columns omitted where not appropriate
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 SELECT Command Called the defining query Indicates precisely what to include in the view Query acts as a sort of window into the database Does not produce a new table, only the view of the table
Background image of page 4
5 Figure 4.1: SQL to Create View CREATE VIEW Housewares AS SELECT PartNum, Description, OnHand, Price FROM Part WHERE Class=‘HW’ ;
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Query on a View With a query that involves a view, the DBMS changes the query to one that selects data from table(s) in the database that created the view The DBMS merges the query with the query that defines the view to form the query that is actually executed One advantage of this approach is that the view never exists in its own right so any update to the table is immediately available in the view If the view were a table, this would not be the case
Background image of page 6
7 Query on a View Selects data only from Tables created in the view Query is merged with query used to create view SELECT * FROM Housewares WHERE OnHand< 25 ; SELECT PartNum, Description, OnHand, Price FROM Part WHERE Class=‘HW’ AND OnHand< 25 ; Actually executes as
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Figures 4.3 - 4.4: Access Query Design of View
Background image of page 8
9 Access Query Design View with Changed Field Names SQL can be used to change the field names in a view by including the new field names in the CREATE VIEW statement The CREATE VIEW statement would be: CREATE VIEW
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 48

chapter04 - Concepts of Database Management, Fifth Edition...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online