logo

Recognition Of The Database Tables

   

Added on  2022-09-08

7 Pages911 Words16 Views
 | 
 | 
 | 
Running head: TOPIC 2
TOPIC 2
Name of the Student
Name of the University
Author Note
Recognition Of The Database Tables_1

A B
TOPIC 21
Introduction:
A relational database is basically a set of tables that grants the access to data and can be
resembled by many ways without the recognition of the database tables. SQL is one of the
standard user and application programming interface (API) of a relational database
(Jananthan et al., 2017). SQL database operations are based on sets and their relationship.
Relational databases operations:
The IN operation in the relational database of T-SQL query is based on a binary relationship
of object to set membership. Venn diagrams are commonly used to graphically represent the
operations of sets (Luo et al., 2018). Let two sets are A = {1,3,6} and B = {3,9,10} then A U
B = {1,3,6,9,10}.
Now, graphically this union operation can be represented as given below by Venn diagrams.
The shaded region represents the set A U B.
Now, in SQL the content of set A and B are fetched through the following SQL query.
SELECT *
FROM A
Recognition Of The Database Tables_2

TOPIC 22
SELECT *
FROM B
Now, the operation of A U B is represented by the following statements in the SQL server.
SELECT *
FROM A
UNION
SELECT *
FROM B
However, the small difference between the T-SQL and the set theory is that in T-SQL the
common elements in two sets can be duplicated in the union set by command UNION ALL
which is not defined in conventional mathematics (Hrbacek & Jech, 2017).
Similarly, the intersection operation in set theory is given by,
A ∩ B = {1,3,6} {3,9,10} = {3}
In SQL server the intersection operation is given by,
SELECT *
FROM A
INTERSECT
SELECT *
FROM B
The difference operation which results the difference of two sets A and B is given by,
Recognition Of The Database Tables_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents