Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2003-2008 Curt Hill The Relational Model of Database Basic organization and terms.

Similar presentations


Presentation on theme: "Copyright © 2003-2008 Curt Hill The Relational Model of Database Basic organization and terms."— Presentation transcript:

1 Copyright © 2003-2008 Curt Hill The Relational Model of Database Basic organization and terms

2 Copyright © 2003-2008 Curt Hill Relational Form is that of a table Each table has –A fixed number of columns The contents of a field in a column may be empty –A variable number of rows A row is known as a tuple A column is a set of fields and is all of the same type Different tables may have different columns

3 Copyright © 2003-2008 Curt Hill Relation In theory a relation is a set –No ordering at all In practice our tuples are often ordered In theory a tuple is also a set In practice a tuples are ordered –We are able to reorder them easily

4 Copyright © 2003-2008 Curt Hill Terms Entity Relationship Attribute Tuple Table Relation Often many synonyms

5 Copyright © 2003-2008 Curt Hill Definition: Schema Schema - describes the rows of a table –A set of attribute names The definition of kinds of attributes making up a tuple –The definition of the file type –This is usually static, that is the file definition does not change over time much Subschema –A piece of a larger schema

6 Schema Flavors Conceptual Schema –AKA logical schema –Describes data in terms of tables Physical Schema –How the data is actually stored –Viewpoint is the disk or hardware External Schema –A subset or different view of the conceptual schema –Different users may see different external schema Copyright © 2003-2008 Curt Hill

7 Definition: Body The actual tuples making up a relation at any one time This usually varies over time The contents of the file can change often and substantially

8 Copyright © 2003-2008 Curt Hill Terms Defined Degree –Count of attributes Cardinality of a relation –Number of tuples present

9 Copyright © 2003-2008 Curt Hill Keys Candidate –Minimal collection of one or more fields that unique identify tuple Primary –One of the candidate keys –Who decides? Business expert not db expert Foreign –Referenced primary in another table

10 Copyright © 2003-2008 Curt Hill Other keys Alternate –A candidate key that is not the primary Secondary –(Not really a relational term) –Any set of attributes Does not have to be unique Does not have to be a candidate key, though candidate keys used in indices are often called secondary –Used as a key in an index structure


Download ppt "Copyright © 2003-2008 Curt Hill The Relational Model of Database Basic organization and terms."

Similar presentations


Ads by Google