Relational Database Model - Essay Example

In order to provide useful means for retrieving or manipulating data In tables. Because the relational model has its mathematical basis upon the relational theory (by thinking tables as sets or relations), the supported database operators conform to existing operators in relational algebra. In fact, a relational database software Implementation, called DB’S, Is said to have higher degree of relational completeness depending upon the extent to which elation algebra operators are supported.

We Will Write A Custom Essay Sample On
ANY TOPIC SPECIFICALLY
FOR YOU

For Only $13.90/page


order now

In total there are eight operators are found in relational theory, namely SELECT, PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT and DIVIDE. Minimally speaking, a DB’S Implementation Is said to be relational If It supports at least the key relational operators, namely SELECT, PROJECT, and JOIN. Very few Dobbs are capable of supporting all eight relational operators. Use of relational algebra operators on existing tables (relations) results in outcomes look like new relations. This characteristic lets the user recursively applying the operators among the operator outcomes.

Figure 6. 2 operator: UNION: ; Needs two tables as Its operands ; Combines all rows from two tables, excluding duplicate rows. ; Tables, used as attribute characteristics for all columns I. E. The columns and domains must be identical). ; Figure-6. 1 demonstrates an example of UNION operation. Popped up Questions Choose the right answer for the UNION Operation shown in the figure. 6. 3 Operator: INTERSECT: ; Needs two tables as its operands ; Yields only the rows that appear in both the tables ; Operand tables must be UNION compatible with each other ; Figure-6. Monstrance an example of INTERSECT operation. Choose the right answer for the INTERSECT Operation shown in the figure. 6. 4 operator: DIFFERENCE ; Yields all rows in one table not found in the other table-?that is, it subtracts one table from the other. ; Requires the UNION compatibility of the operand tables. ; Figure-6. 3 demonstrates an example of DIFFERENCE operation. Choose the right answer for the DIFFERENCE Operation shown in the figure. 6. 5 operator: PRODUCT ; Yields all possible pairs of rows from the two tables. The operand tables are not necessarily UNION compatible with each other.

The yielded result is also known as the Cartesian product. Figure-6. 4 demonstrates an example of PRODUCT operation. Choose the right answer for the SELECT Operation shown in the figure. 6. 6 operator: SELECT ; Needs a single table as its operand ; Yields values for all rows found in the table ; Can be used to list either all row values or it can yield only those row values that match a specified criterion ; Figure-6. 5 demonstrates an example of SELECT operation. Choose the right answer for the SELECT Operation shown in the figure. 6. Operator: PROJECT ; Uses a single table as its operand Yields all values for selected attributes ; Yields a vertical subset of a table ; Figure-6. 6 demonstrates an example of PROJECT operation. Choose the right answer for the PROJECT Operation shown in the figure. 6. 8 Operator: JOIN ; Allows us to combine information from two tables ; Uses two table having a common attribute as its operands ; Join operation is considered as the real power behind the relational database implementations (READS) ; JOIN allows the use of independent tables, linked by common attributes, resulting in minimal redundancy possible. Seibel types of JOIN includes: NATURAL JOIN, EQUINOX, THETA JOIN, LEFT OUTER JOIN, and RIGHT OUTER JOIN Figurer. 7 shows the table examples used in the forth coming discussion of different JOIN operators: 6. 8. 1 JOIN subtype: NATURAL JOIN ; The operands must have common attribute(s) in order to yield the Join outcome. Such common attributes are called Join column(s) ; Links two tables by selecting only rows with common values in their Join column(s) ; Works in a three-step process: Step 1. PRODUCT of the tables is created step 2.

SELECT is performed on Step 1 output to yield only the rows for which the Join alumni values are equal. Step 3. PROJECT is performed on Step 2 results to yield a single copy of each attribute, Choose the right answer for the NATURAL JOIN Operation shown in the figure. 6. 8. 2 JOIN subtype: EQUINOX ; Links tables on the basis of an equality condition that compares specified columns Onion columns) of each table ; Outcome does not eliminate duplicate columns. In other words, the result will show the Join column more than once. Figure ; In equinox, the condition used to Join the tables is equal to thus the name equinox. 6. . 3 JOIN subtype: THETA JOIN While Joining the tables using Join condition having any other comparison operator other than equal to the Join is called theta Join. Choose the right answer for the EQUINOX/ ATTESTATION Operation shown in the figure. 6. 8. 4 JOIN subtype: LEFT/ RIGHT OUTER JOIN In normal Join operations, the outcome shows only the rows of the tables having matching values in the Join columns while the rows having unmatched values are discarded. In case, if unmatched rows are required to be shown in the outcome (some columns in the result will be having NULL values), the resultant Join is called an Outer Join.

While taking and outer Join between two tables A and B, there could be two possible outcomes. O If the result shows all the matching rows and the unmatched rows of A with the NULL values in the columns of B, the Join is called Left outer Join (allows the unmatched rows of left table to come). Figure 6. 13 is demonstrating LEFT OUTER JOIN using tables of Figure 6. 7. O If the result shows all the matching rows and the unmatched rows of B with the NULL values in the columns of A, the Join is called Right outer Join (allows the unmatched rows of right table to come).