The Relational Model - PowerPoint PPT Presentation

About This Presentation
Title:

The Relational Model

Description:

Relationships. Operations. Relation. Attributes. Occurrences or. Tuples. Relation Requirements. Attributes are single valued, and all entries have the same data type ... – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 11
Provided by: alschwa
Learn more at: https://www.ou.edu
Category:

less

Transcript and Presenter's Notes

Title: The Relational Model


1
The Relational Model
  • Pratt Adamski, Chapter 2

2
Relational Algebra
  • Project
  • Select
  • Join
  • Union
  • Intersect
  • Subtract
  • Product
  • Division

3
Relational Database
  • Based in formal set theory
  • Most common data structure
  • Provable design principles

4
Relational Definition
  • Relations
  • Attributes
  • Relationships
  • Operations

5
Relation
Attributes
Occurrences or Tuples
6
Relation Requirements
  • Attributes are single valued, and all entries
    have the same data type
  • Each attribute has a distinct name
  • All values in a column are values of the same
    attribute
  • The order of columns is irrelevant
  • Each row is distinct
  • The order of rows is irrelevant

7
Premiere Products Example
8
Row OperationsSelect, Project, Join
  • SELECT returns desired rows
  • PROJECT returns desired columns
  • JOIN creates one table from two by matching
    specified column values in the two tables

9
Set OperationsUnion, Intersection, Difference
  • Returns the union, intersection, or difference
    of rows in two tables
  • Note both tables must be union compatible.
    They must have the same number of columns and the
    corresponding columns must have the same data
    types.

10
Table OperationsProduct, Division
  • PRODUCT (Cartesian product) produces a table with
    the columns of both tables and rows consisting of
    all combinations of rows from the two tables. If
    table A has m rows and table B has n rows, the
    product will have mn rows.
  • DIVISION (A divided by B where the columns in B
    are also in A) produces a table consisting of
    columns in A that are not in B and match all the
    rows in B.
Write a Comment
User Comments (0)
About PowerShow.com