DBMS Unit-II-The Relational Model
DBMS Unit-II-The Relational Model
Assistant Professor
CS&AI
Class: CSE-II/II
The Relational Model, Relational
Syllabus: database design using ER.
ER to relational mapping
Relational algebra and relational
calculus
Tuple Relational Calculus, Domain
Relational Calculus, SQL.
Course
Teacher
3-Schema Architect
ure
1. Create
SQL Languages:
2. Drop
3. Alter
4. Truncate
5. Describe
Data Definition
DROP DATABASE DatabaseName;
Language Example:
Statements: If you want to delete an existing database
testDB then DROP DATABASE statement would
be as follows:
SQL> DROP DATABASE testDB;
Syntax:
SELECT expressions
Data FROM TABLES
Manipulation WHERE conditions;
Language
Statements: For example:
SELECT emp_name
FROM employee
WHERE age > 20;
a. Grant
SQL Languages
b. Revoke
(DCL):
a.Grant: It is used to give user access privileges to a database.
b.Revoke: It is used to take back permissions from the user.
Specialized users
Sophisticated users ,but they write special
database application programs that do not fit
into traditional data processing framework.
Database Management Systems Syed Nawaz(Asst Professor)
The Functional components of a
database system can be divided in to
Query Processor Components
Storage Manager Components
DBMS architecture
Dbms Architecture
Schema Refinement
ER Model
Employees
Purchaser
Beneficiary
Better design
Policies
policyid cost
Database Management Systems Syed Nawaz(Asst Professor)
Previous example illustrated a case when two binary
relationships were better than one ternary relationship.
An example in the other direction: a ternary relation
Contracts relates entity set Parts, Departments and
Suppliers, and has descriptive attributes qty. No
combination of binary relationships is an adequate
substitute:
S “can-supply” P, D “needs” P, and D “deals-with” S does not imply
that D has agreed to buy P from S.
How do we record qty?