Use any one of the above four tables along with a real-life example to demonstrate whether the operation of JOIN is an idempotent on the set of tables. Use any two of the above four tables along with a real-life example to demonstrate whether the operation of JOIN is commutative on the set of tables.

  • A database usually takes the key areas of business and breaks them into structured tables. Each table will store information on a key area; four of which are listed below.
  1. Staff table– A record of each member of staff and usually includes the hierarchy of management and job description. Let this table be denoted by T1.
  2. Customer table – This table will store who the customers are and how to contact them; e.g., address, email, …, etc. Let this table be denoted by T2.
  3. Product table – A table that brings all the product information together; such as product name, product color, product description, …, etc. Let this table be denoted by T3.
  4. Orders table – This table keeps a record of each order the company has processed and would refer to a lot of key areas in the business; e.g., who made the sale, who was sold to, what was sold, when it was sold, …, etc. Let this table be denoted by T4.
  • Background 2:
  1. An operator or a relation R acting on a set of elements is said to be an idempotent if, for any element x in the set, we have: xRx=x. For example, the logical conjunction AND is idempotent since for any statement p, we have (p AND p)=p; that is, the statements (p AND p) and p have the same truth values. Other examples of idempotent operations are (1): the absolute value function (ABS(x)=|x|) since ABS(ABS(x))=ABS(x) for any real number x, and (2): any function looking up a customer’s address in a database.
  2. An operator or a relation R acting on a set of elements is said to be commutative if for any two elements x and y in the set, we have xRy=yRx. For example, the operation of addition is commutative over the set of real numbers since for any two real numbers x and y, we have: x+y=y+x; e.g., 3+5=5+3. Multiplication of real numbers is also commutative but subtraction and division are not commutative operations.
  3. An operator or a relation R acting on a set of elements is said to be associative if for any three elements xy, and z in the set, we have (xRy)Rz=xR(yRz). For example, the operations of addition and multiplication are both associative since for example, (3+5)+2=3+(5+2), or (3*5)*2=3*(5*2).
  • Question 1: Use any one of the above four tables along with a real-life example to demonstrate whether the operation of JOIN is an idempotent on the set of tables (first indicate which of the four tables you have used in your demonstration).

  • Question 2: Use any two of the above four tables along with a real-life example to demonstrate whether the operation of JOIN is commutative on the set of tables (first indicate which of the four tables you have used in your demonstration).

  • Question 3: Use any three of the above four tables along with a real-life example to demonstrate whether the operation of JOIN is associative on the set of tables (first indicate which of the four tables you have used in your demonstration).

SAMPLE ASSIGNMENT
Powered by WordPress