1 / 10

The Relational Model

The Relational Model. Pratt & Adamski, Chapter 2. Project Select Join. Union Intersect Subtract Product Division. Relational Algebra. Relational Database. Based in formal set theory Most common data structure Provable design principles. Relational Definition. Relations Attributes

gomer
Download Presentation

The Relational Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Relational Model Pratt & Adamski, Chapter 2

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

  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 Operations:Select, 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 Operations:Union, 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 Operations:Product, 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 m*n 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.

More Related