18CSC303J - Database Management System
18CSC303J - Database Management System
4M:
EMPLOYEE
… … …
WORKS_IN
since
DEPARTMENT
… … …
Many attributes will be given. Identify the primary key, candidate key, alternate key.
What is a super key?
A set of attributes that collectively identifies an entity in an entity set
It is a superset of a candidate key
For example, if employee_id and license_number are candidate keys then they both
can be combined as a super key
Create views with single and multiple tables. How to see the data from a view
Single table:
CREATE VIEW DETAILSVIEW AS SELECT NAME,
ADDRESS FROM STUDENT_DETAILS WHERE S_ID <= 5;
SELECT * FROM DETAILSVIEW;
Multiple table:
CREATE VIEW MARKSVIEW AS SELECT
STUDENT_DETAILS.NAME,
STUDENT_DETAILS.ADDRESS,
STUDENT_MARKS.MARKS FROM STUDENT_DETAILS,
STUDENT_MARKS WHERE STUDENT_DETAILS.NAME =
STUDENT_MARKS.NAME;
SELECT * FROM MARKSVIEW;
READ MORE
READ MORE
READ MORE
Powered by Blogger
VISIT PROFILE
Archive
Report Abuse