0% found this document useful (0 votes)
15 views82 pages

DBMS Unit-2

The document provides an overview of the Relational Model, which organizes data into tables (relations) with unique tuples, and highlights its advantages such as simplicity and ease of querying. It discusses key concepts like attributes, integrity constraints, and the importance of maintaining data integrity through various constraints, including domain, entity, and referential integrity. Additionally, it covers views in databases, their creation, and management, along with examples of SQL commands for creating and updating views.

Uploaded by

shinchanm1809
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views82 pages

DBMS Unit-2

The document provides an overview of the Relational Model, which organizes data into tables (relations) with unique tuples, and highlights its advantages such as simplicity and ease of querying. It discusses key concepts like attributes, integrity constraints, and the importance of maintaining data integrity through various constraints, including domain, entity, and referential integrity. Additionally, it covers views in databases, their creation, and management, along with examples of SQL commands for creating and updating views.

Uploaded by

shinchanm1809
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 82

Relational Model

• Relational Model represents how data is stored in Relational


Databases. A relational database stores data in the form of relations
(tables), where each relation is a table with rows and columns.
Consider a relation STUDENT with attributes SID, NAME, Login, AGE
and gpa shown in Table below. This simple tabular representation
enables even novice users to understand the contents of a database,
and it permits the use of simple, high-level languages to query the
data. The major advantages of the relational model over the older
data models are its simple data representation and the ease with
which even complex queries can be expressed.
• Some popular Relational Database management systems are:
- DB2 and Informix Dynamic Server - IBM
- Oracle and RDB – Oracle
- SQL Server and Access – Microsoft
• An instance of the Students relation appears in Figure.
The instance contains six tuples and has, as we expect
from the schema, five fields. Here no two rows are
identical. This is a requirement of the relational model-
each relation is defined to be a set of unique tuples or
rows.
Relational Model Concepts
• Attribute: Each column in a Table. Attributes are
the properties which define a relation. e.g.,
Student_Rollno, NAME, etc.
• Tables: In the Relational model the, relations are
saved in the table format. It is stored along with its
entities. A table has two properties rows and
columns. Rows represent records and columns
represent attributes.
• Tuple: It is nothing but a single row of a table,
which contains a single record.
• Relation Schema: A relation schema represents the
• Degree: The total number of attributes which in the relation is
called the degree of the relation.
• Cardinality: Total number of rows present in the Table.
• Column: The column represents the set of values for a specific
attribute. FIELDS (ATTRIBUTES, COLUMNS)
• Relation instance: Relation instance is a finite set of tuples in
the RDBMS system. Relation instances never have duplicate
tuples.
• Relation key: Every row has one, two or multiple attributes,
which is called relation key.
• Attribute domain: The attribute domain is the set
of values allowed in an attribute. The consequence is that
each value in the tuple must be of some basic type, like a
string or an integer.
• NULL Values: The value which is not known or unavailable is
Integrity Constraints over Relations
• Integrity Constraints are a set of rules. They are
used to maintain the quality of information.

• Integrity Constraints ensure that the data insertion,


Updating and other processes have to be
performed in such a way that data integrity is not
affected.

• Thus, Integrity Constraints are used to guard


against accidental damage to the database.
Types of Integrity Constraints

• Domain Constraints

• Entity Integrity Constraints

• Referential Integrity Constraints

• Key Constraint
Domain Constraints
• Domain Constraints can be defined as the
definition of a valid set of values for an
attribute.
• The data type of domain includes String,
Character, Integer, Real, Time, Date, Currency,
Etc. The value of that attribute must be
available in the corresponding domain.
• A domain of possible values must be
associated with every attribute
• They are tested easily by the system whenever a
new data item is entered into the database.
• Each table has certain set of columns and each
column allows a same type of data, based on its
data type. The column does not accept values of
any other data type.
• Domain constraints can be violated if an attribute
value is not appearing in the corresponding
domain or it is not of the appropriate data type.
• Example : If there is a column(attribute) of integer
values then we can’t put an alphabet in it. Since
the attribute has only integer values as its domain
Age
17
22
23
24
25
A
Not allowed Because Age is an
Integer Attribute
Entity Integrity Constraints
• Entity Integrity Constraints states that primary
key value can’t be NULL.

• This is because the primary key value is used to


identify individual rows in Relation and If
primary key has a Null value then we can’t
identify those Rows.

• A Table(Relation) can contain a Null value other


than the primary key field.
• Example:
EMP-ID EMP-Name

123 A

132 B

135 C

136 D

137 E

F Not Allowed . As primary Key can’t


Be Null
Referential Integrity Constraints

• A Referential Integrity Constraints are specified


between Two Tables.
• In the Referential Integrity Constraints , If a
foreign key in Table 1 refers to the primary key of
Table 2 Then every value of the foreign key in
Table 1 must be Null or Be available in Table 2.
• A FOREIGN KEY is a field (or collection of fields) in
one table, that refers to the Primary key in
another table.
• The table with the foreign key is called the child
table or Referencing table, and the table with
the primary key is called the referenced or
parent table.

• The FOREIGN KEY constraint is used to prevent


actions that would destroy links between tables.

• The FOREIGN KEY constraint prevents invalid


data from being inserted into the foreign key
column, because it has to be one of the values
contained in the parent table.
Example: Foreign Key
Primary key
Employee Department
Emp.Id Name Age D.NO.
D.NO. D.Loc.

1 A 20 10 10 Hyderabad

2 B 30 14 14 Delhi
Relationships
3 C 40 17 13 Noida

4 D 50 13
Table 2
Table 1

D.No.17 is not Allowed Because it is not defined As a primary key of Table 2 and In Table 1
D.No. is a foreign key Defined.
Key Constraints
• Keys are the entity set that is used to identify
an entity within its entity set uniquely.

• An entity set can have multiple keys. But out


of which one key will be the primary key.

• A primary key can contain a unique and Null


value in the relational table.
Example:
EMP.ID
1001
1002
1003
1005
1002 Not allowed because all rows must be unique
1009
Enforcing Integrity Constraints
• Data integrity refers to the correctness, Consistent and
completeness of data within a database. To enforce data integrity,
you can constraint or restrict the data values that users can insert,
delete, or update in the database.
• Transact-SQL provides several mechanisms for integrity enforcement
in a database such as rules, defaults, indexes, and triggers. These
mechanisms allow you to maintain these types of data integrity:
- Requirement
- Check or validity
- Uniqueness
- Referential
• Data integrity is enforced by database constraints
• Database Constraints are declarative integrity rules of defining table
structures.
They include the following 8 constraint types:
• Data type constraint:
This defines the type of data, data length, and
a few other attributes which are specifically
associated with the type of data in a column.

• Default constraint:
Provides a default value for a column when
none is specified.
• NOT NULL constraint − Ensures that a column cannot
have NULL value.

• Primary key constraint:


- uniquely identifies each row/record in a database
table.
- This is the unique identifier of the table. Each row
must have a distinct value.
- The primary key can be either a sequentially
incremented integer number or a natural selection of
data that represents what is happening in the real world.
- NULL values are not allowed in primary key values
• Unique constraint:
- Ensures that all values in a column are different.
- Sometimes the data in a column must be unique
even though the column does not act as Primary Key of
the table.
• Foreign key constraint:
- This defines how referential integrity is enforced
between two tables.
− uniquely identifies a row/record in any of the
given database table.
- Data inserted into a table column must already
have matching data in another table column or another
column in the same table.
• Check constraint:
- The CHECK constraint ensures that all the values
in a column satisfies certain conditions.
- This defines a validation rule for the data values in
a column so it is a user-defined data integrity constraint.
- This rule is defined by the user when designing
the column in a table. Not every database engine
supports check constraints.
- As of version 5.0, MySQL does not support check
constraint. But you can use enum data type or set data
type to achieve some of its functionalities that are
available in other Relational Database Management
Systems (Oracle, SQL Server, etc).
• INDEX− Used to create and retrieve data from
the database very quickly.
Logical Database Design: ER to Relational
The ER model is convenient for representing an initial, high-level database
design. Given an ER diagram describing a database, a standard approach is
taken to generating a relational database schema that closely
approximates the ER design.
• Entity Sets to Tables :
An entity set is mapped to a relation in a straightforward way: Each
attribute of the entity set becomes an attribute of the table. Note that we
know both the domain of each attribute and the (primary) key of an entity
set.

Emp_No. Emp_Name Emp_Salary

Employee
• CREATE TABLE Employee (Emp_No. INTEGER,
Emp_Name CHAR(20), Emp_Salary MONEY, PRIMARY
KEY(Emp_No.))
Relationship Sets (without Constraints) to Tables:
A relationship set, like an entity set, is mapped to a
relation in the relational model. To represent a
relationship, we must be able to identify each
participating entity and give values to the descriptive
attributes of the relationship.
Thus, the attributes of the relation include:
• The primary key attributes of each participating entity
set, as foreign key fields.
• ER Diagram:

Did D.Name
E.No. E.Name Salary Since

Employees Works_In Departments


• CREATE TABLE Employees (Emp_No. INTEGER,
Emp_Name CHAR(20), Salary MONEY, PRIMARY
KEY(Emp_No.))
• CREATE TABLE Works_In (Emp_No. INTEGER , Did
INTEGER, Since DATE, PRIMARY KEY(Emp_No,
Did), FOREIGN KEY (Emp_No.) REFERENCES
Employees, FOREIGN KEY (Did) REFERENCES
Departments)
• CREATE TABLE Departments (Did INTEGER,
D.Name CHAR(20))
Translating Relationship Sets with Key Constraints

If a relationship set involves “n” entity sets and


some of them are linked via arrows in the ER
diagram, the key for anyone of these m entity sets
constitutes a key for the relation to which the
relationship set is mapped. Hence we have m
candidate keys, and one of these should be
designated as the primary key.
• ER Diagram:

Did D.Name
E.No. E.Name Salary Since

Employees Manages Departments


• CREATE TABLE Manages( E.No. CHAR(11), Did
INTEGER, since DATE, PRIMARY KEY (Did),
FOREIGN KEY (E.No.) REFERENCES Employees,
FOREIGN KEY (Did) REFERENCES Departments)
Introduction to views, destroying/altering tables
and views
• A view is a virtual or logical table that allows to
view or manipulate parts of the tables. A view also
has rows and columns as they are in a real table in
the database.
• A view is a table whose rows are not explicitly
stored in the database but are computed as needed
from a view definition.
• VIEWS are virtual tables that do not store any data
of their own but display data stored in other tables.
In other words, VIEWS are nothing but SQL Queries.
A view can contain all or a few rows from a table.
• To reduce redundant data to the minimum
possible, the DBMS allows the creation of an
object called a VIEW.
• A View is mapped, to a SELECT sentence. The table
on which the view is based is described in the
FROM clause of the SELECT statement.
• Some Views are used only for looking at table
data. Other Views can be used to Insert, Update
and Delete table data as well as View data.
• Types of views :
1. Updateable View/Simple View: A View that is used to look at table
data as well as Insert, Update and Delete table data is called an
Updateable View(Simple View). It Allows SELECT as well as INSERT,
UPDATE and DELETE operations. It Can Access data from single table.

2. Read-only View/Complex View/Non-Updateable view: If a View


is used to only look at table data and nothing else the View is called a
Read Only View(Complex View/Non-Updateable view). It Allows only
SELECT operations. It can access required data from multiple tables.

• The reasons why views are created are:


– When Data security is required
– When Data redundancy is to be kept to the minimum while
maintaining data security.
We can create View using CREATE VIEW statement.
A View can be created from a single table or multiple
tables.
Syntax:
• CREATE VIEW view_name AS SELECT column1,
column2..... FROM table_name WHERE
condition;

view_name: Name for the View


table_name: Name of the table
condition: Condition to select rows
Examples:
• Creating View from a single table:
– In this example we will create a View named
DetailsView from the table StudentDetails.

– Query: CREATE VIEW DetailsView AS SELECT Name,


Address FROM StudentDetails WHERE S_ID < 5;

– To see the data in the View, we can query the view in


the same manner as we query a table.
– SELECT * FROM DetailsView;
CREATE VIEW StudentNames AS SELECT S_ID, NAME
FROM StudentDetails Where S_ID < 5;
If we now query the view as,
• SELECT * FROM StudentNames;

S_ID Names
1 Harsh
2 Ashish
3 Pratik
4 Dhanraj
• Creating View from multiple tables:
In this example we will create a View named MarksView from
two tables StudentDetails and StudentMarks. To create a View
from multiple tables we can simply include multiple tables in the
SELECT statement.
Query:
CREATE VIEW MarksView AS SELECT
StudentDetails.NAME, StudentDetails.ADDRESS,
StudentMarks.MARKS FROM StudentDetails,
StudentMarks WHERE StudentDetails.NAME =
StudentMarks.NAME;
To display data of View MarksView:
SELECT * FROM MarksView;
Output:
• DELETING VIEWS
We have learned about creating a View, but what if a created
View is not needed any more? Obviously we will delete it. SQL
allows us to delete an existing View. We can delete or drop a
View using the DROP statement.
Syntax:
• DROP VIEW view_name;
view_name: Name of the View which we want to
delete.
• For example, if we want to delete the
View MarksView, we can do this as:
• DROP VIEW MarksView;
UPDATING VIEWS
• There are certain conditions needed to be satisfied to update a view. If
any one of these conditions is not met, then we will not be allowed to
update the view.
1. The SELECT statement which is used to create the view should
not include GROUP BY clause or ORDER BY clause.
2. The SELECT statement should not have the DISTINCT keyword.
3. The View should have all NOT NULL values.
4. The view should not be created using nested queries or complex
queries.
5.The view should be created from a single table. If the view is
created using multiple tables then we will not be allowed to update the
view.
• We can use the CREATE OR REPLACE VIEW statement to add or
remove fields from a view.
Syntax:
• CREATE OR REPLACE VIEW view_name AS SELECT column1,coulmn2,..
>update StudentNames set Names=‘Shiva' where S_ID=2;
1 Row updated.
SQL>select * from StudentNames;

S_ID Names
1 Harsh
2 Shiva
3 Pratik
4 Dhanraj
• For example, if we want to update the
view MarksView and add the field AGE to this
View from StudentMarks Table, we can do this as:

• CREATE OR REPLACE VIEW MarksView AS SELECT


StudentDetails.NAME, StudentDetails.ADDRESS,
StudentMarks.MARKS, StudentMarks.AGE FROM
StudentDetails, StudentMarks WHERE
StudentDetails.NAME = StudentMarks.NAME;
• If we fetch all the data from MarksView now as:
• SELECT * FROM MarksView;
Output:
• Inserting a row in a view:
We can insert a row in a View in a same way as we
do in a table. We can use the INSERT INTO
statement of SQL to insert a row in a View.
• Syntax:
INSERT INTO view_name VALUES(value1,
value2, value3..);

view_name: Name of the View


Example:

In the below example we will insert a new row in the


View DetailsView which we have created above in
the example of “creating views from a single table”.

• INSERT INTO DetailsView VALUES(‘Suresh’,


’Gurgaon’);
If we fetch all the data from DetailsView now as,
• SELECT * FROM DetailsView;

Output:
Deleting a row from a View:
Deleting rows from a view is also as simple as
deleting rows from a table. We can use the DELETE
statement of SQL to delete rows from a view. Also
deleting a row from a view first delete the row from
the actual table and the change is then reflected in
the view.
Syntax:
DELETE FROM view_name WHERE condition;
view_name: Name of view from where we want to
delete rows
condition: Condition to select rows
Example:

In this example we will delete the last row from the


view DetailsView which we just added in the above
example of inserting rows.

• DELETE FROM DetailsView WHERE


NAME="Suresh";
• If we fetch all the data from DetailsView now as,
SELECT * FROM DetailsView;
Output:
Relational Algebra
• The relational algebra is a procedural query language. It
consists of a set of operations that take one or two relations
as input and produce a new relation as their result.
• The fundamental operations in the relational algebra are
select, project, union, Set Intersection, set difference,
Cartesian product, and rename.
• In addition to the fundamental operations, there are several
other operations—namely-natural join, and assignment..
• The select, project, and rename operations are called unary
operations because they operate on one relation. The other
three operations operate on pairs of relations and are,
therefore, called binary operations
• It gives a step by step process to obtain the result of the query. It
uses operators to perform queries.
• The SELECT(σ) : This operation is used for selecting a subset of the
tuples according to a given selection condition. It is denoted by
sigma (σ). It is used as an expression to choose tuples which meet
the selection condition. Select operator selects tuples that satisfy a
given predicate.
Notation: σ p(r)
Where:
σ is used for selection prediction
r is used for relation
p is used as a propositional logic formula which may use
connectors like: AND OR and NOT. These relational can use as
relational operators like =, ≠, ≥, <, >, ≤.
• For example: LOAN Relation

BRANCH_NAME LOAN_NO AMOUNT


Downtown L-17 1000
Redwood L-23 2000
Perryride L-15 1500
Downtown L-14 1500
Mianus L-13 500
Roundhill L-11 900
Perryride L-16 1300
Input/Query:
σ BRANCH_NAME="perryride" (LOAN)

Output: BRANCH_NAME LOAN_NO AMOUNT

Perryride L-15 1500

Perryride L-16 1300


• σ (BRANCH_NAME="Downtown“) ∧ (LOAN_NO = L-17) (LOAN)

BRANCH_NAME LOAN_NO AMOUNT

Downtown L-17 1000


• Projection(∏):The projection eliminates all attributes of the
input relation but those mentioned in the projection list. The
projection method defines a relation that contains a vertical
subset of Relation. This helps to extract the values of specified
attributes to eliminate duplicate values. (pi)/ (∏) symbol is used to
choose attributes from a relation. This operator helps you to keep
specific columns from a relation and discards the other columns

Notation: ∏ A1, A2, An (r)

Where
A1, A2, A3 is used as an attribute name of relation r.
• Example: CUSTOMER RELATION

NAME STREET CITY


Jones Main Harrison
Smith North Rye
Hays Main Harrison
Curry North Rye
Johnson Alma Brooklyn
Brooks Senator Brooklyn
• Input/Query: ∏ NAME, CITY (CUSTOMER)
• Output:
NAME CITY
Jones Harrison
Smith Rye
Hays Harrison
Curry Rye
Johnson Brooklyn
Brooks Brooklyn
• σ NAME=Jones (∏ NAME, CITY (CUSTOMER))
NAME CITY
Jones Harrison

∏ NAME, CITY (σ STREET=North (CUSTOMER))


NAME CITY

Smith Rye

Curry Rye
• Union operation (U) :
• UNION is symbolized by ∪ symbol. It includes all tuples that are in
tables A or in B. It also eliminates duplicate tuples.
• So, set A UNION set B would be expressed as:
– The Notation is A ∪ B For a union operation to be valid, the
following conditions must hold
• R and S must be the same number of attributes.
• Attribute domains need to be compatible.
• Duplicate tuples should be automatically removed.

Example1: Consider the following two relations R and S:


• Relation R
ID Name Subject
100 Ankit English
200 Pooja Maths
300 Komal Science

• Relation S
ID Name Subject

100 Ankit English

400 Kajol French


• Then Relation RUS is:
ID Name Subject
100 Ankit English
200 Pooja Maths
300 Komal Science
400 Kajol French
Example2: Consider Two relations DEPOSITOR
and BORROW
• DEPOSITOR RELATION
CUSTOMER_NAME ACCOUNT_NO

Johnson A-101

Smith A-121

Mayes A-321

Turner A-176

Johnson A-273

Jones A-472

Lindsay A-284
• BORROW RELATION

CUSTOMER_NAME LOAN_NO

Jones L-17

Smith L-23

Hayes L-15

Jackson L-14

Curry L-93

Smith L-11

Williams L-17
• Input:
∏ CUSTOMER_NAME (BORROW) ∪ ∏ CUSTOMER_NAME (DEPOSITOR)

• Output:
CUSTOMER_NAME

Johnson
Smith
Hayes
Turner
Jones
Lindsay
Jackson
Curry
Williams
Mayes
• Intersection Operator (∩) :Let R and S be two relations.
Then-
– R ∩ S is the set of all tuples belonging to both R and S.
– In R ∩ S, duplicates are automatically removed.
– Intersection operation is both commutative and associative.

Example1: Consider the following two relations R and S:


Relation R:
ID Name Subject

100 Ankit English

200 Pooja Maths

300 Komal Science


• Relation S:
ID Name Subject
100 Ankit English
400 Kajol French

Then, Relation R ∩ S is:


ID Name Subject

100 Ankit English


Example 2: Based on Previous example 2 in Union Operation
Input:
∏ CUSTOMER_NAME (BORROW) ∩ ∏ CUSTOMER_NAME (DEPOSITOR)
Output:

CUSTOMER_NAME

Smith
Jones
• Difference Operator (-): Let R and S be two relations.
Then-
– R – S is the set of all tuples belonging to R and not to S.
– In R – S, duplicates are automatically removed.
– Difference operation is associative but not commutative.

Example1: The, R – S for the above two relations R and S (Shown


in Union Operation in Example 1 ) is

ID Name Subject

200 Pooja Maths

300 Komal Science


• Example 2: Using the above DEPOSITOR table and BORROW
table
• Input:
• ∏ CUSTOMER_NAME (BORROW) - ∏ CUSTOMER_NAME (DEPOSITOR)
• Output:

CUSTOMER_NAME

Jackson
Hayes
Willians
Curry
• Cartesian Product: The Cartesian product is used to
combine each row in one table with each row in the other table.
It is also known as a cross product.
• It is denoted by X.
• Notation: E X D

Example:
EMPLOYEE

EMP_ID EMP_NAME EMP_DEPT

1 Smith A

2 Harry C

3 John B
DEPARTMENT

DEPT_NO DEPT_NAME

A Marketing

B Sales

C Legal

Input:

EMPLOYEE X DEPARTMENT

Output:
EMP_ID EMP_NAME EMP_DEPT DEPT_NO DEPT_NAME
1 Smith A A Marketing
1 Smith A B Sales
1 Smith A C Legal
2 Harry C A Marketing
2 Harry C B Sales
2 Harry C C Legal
3 John B A Marketing
3 John B B Sales
3 John B C Legal
• Rename (ρ):
• Rename is a unary operation used for renaming
attributes of a relation and rename the output
relation. It is denoted by rho (ρ).
• Example : ρ a/b(R) will rename the attribute 'b' of
relation by 'a'.
• Example: We can use the rename operator to
rename STUDENT relation to STUDENT1.
• ρ(STUDENT1, STUDENT) or ρSTUDENT1 (STUDENT)
• Example Query: σ Condition(User X ρUser1(User))
Relational Calculus
• Relational calculus is a non-procedural query
language. In the non-procedural query language,
the user is concerned with the details of how to
obtain the end results.
• The relational calculus tells what to do but never
explains how to do.
• Relational Calculus exists in two forms:
– Tuple Relational Calculus (TRC)
– Domain Relational Calculus (DRC)
Tuple Relational Calculus (TRC)
• The tuple relational calculus is specified to select
the tuples in a relation. In TRC, filtering variable
uses the tuples of a relation.
• The result of the relation can have one or more
tuples.
• {t | P (t)} or {t | condition (t)} — this is also known
as expression of relational calculus Where t is the
resulting tuples, P(t) is the condition used to fetch
t.
• {t | EMPLOYEE (t) and t.SALARY>10000} – implies
that it selects the tuples from EMPLOYEE relation
such that resulting employee tuples will have
salary greater than 10000. It is example of
selecting a range of values.
• Here the t.SALARY >10000 refers for all the
SALARY>10000, display the employees. Here the
SALARY is called as bound variable. Any tuple
variable with ‘For All’ (∀ ) or ‘there exists’ (∃)
condition is called bound variable
• {t | EMPLOYEE (t) AND t.DEPT_ID = 10}
– this select all the tuples of employee
name who work for Department 10.
The variable which is used in the condition
is called tuple variable. In above example
t.SALARY and t.DEPT_ID are tuple variables
Domain Relational Calculus

• The domain relational calculus uses list of


attribute to be selected from the relation based
on the condition.

• It is same as TRC, but differs by selecting the


attributes rather than selecting whole tuples. It is
denoted as below: {< a1, a2, a3, … an > | P(a1, a2,
a3, … an)} Where a1, a2, a3, … an are attributes of
the relation and P is the condition.
• For example, select EMP_ID and EMP_NAME of
employees who work for department 10
• {< EMP_ID, EMP_NAME > | < EMP_ID, EMP_NAME > ∈ EMPLOYEE Λ DEPT_ID =
10}

• Get name of the department name that Alex


works for
• {DEPT_NAME |< DEPT_NAME > ∈ DEPT Λ
DEPT_ID ∈ EMPLOYEE Λ EMP_NAME = Alex)}

You might also like