CIST-1200- Database Management
Chapter 4: THE RELATIONAL MODEL 2: INDEXES
Lecture 4-B
DUE: SEP 30
NAME:------------------------------------------------DATE:-------
1. What are views?
Views are application program’s or individual user’s picture of the database
Less involved than full database
Simplification
Security
Example:
CREATE VIEW Housewares AS
SELECT PartNum, Description, OnHand, Price
FROM Part
WHERE Class='HW';
2. How indexes improve database performance?
Indexes improve performance by using Record numbers automatically assigned and used by DBMS to Increase data retrieval efficiency
Example:
CREATE INDEX CustomerName ON Customer (CustomerName);
3. Explain the security features of a DBMS
Prevention of unauthorized access to database
GRANT SELECT ON Customer TO Jones;
Example to cancel
REVOKE SELECT ON Customer FROM Jones;
4. What is entity?
Name of place, things, persons to track in database called a table
5. What is referential integrity?
if table-A contains a foreign key that matches the primary key of table-B, the values of this foreign key must match the value of the
primary key for some row in table B or be null
Example to create non existence foreign Key
FOREIGN KEY (RepNum) REFERENCES Rep
6. What is legal-values integrity?
A set of values allowable in a field
Example:
CHECK (CreditLimit IN (5000, 7500, 10000, 15000))
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.