354.RelationalModel

354.RelationalModel - Database Systems I The Relational...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester  1 Database Systems I  The Relational Data Model
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester  2 What is a Data Model?  A formal notation (language) for describing data. Structure  of the data  Conceptual model Higher level of abstraction than data structures in  programming languages such as lists or arrays. Operations  on the data  Limited set of high level operations: queries and  modifications. Speeds-up database programming. Allows DBS to optimize query execution, e.g. choice of  most efficient sorting method.  Constraints  on the data Capture more of the real world meaning of the data.
Background image of page 2
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester  3 Why Study the Relational Model?  Most widely used model. Vendors: Oracle, IBM, Microsoft, Sybase, etc. “Legacy systems” in older models.  E.g., IBM’s IMS Not so recent competitor: object-oriented model.  ObjectStore, Versant, Ontos A synthesis emerging:  object-relational model Informix Universal Server, Oracle, DB2 More recent competitor: semi-structured model. XML
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester  4 Relational Database: Definitions Relational database a set of  relations . Relation  made up of 2 parts: Schema   :   specifies   name of relation, plus name and  type of each column. E.g. Students( sid : string,  name : string,  login : string,                          age : integer,  gpa : real). Instance  : a  table , with rows and columns.  #rows =  cardinality , #columns =  degree / arity.
Background image of page 4
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester  5 Relational Database: Definitions Rows are called  tuples  (or  records ), columns  called  attributes  (or  fields ). Attributes are referenced not by column number,  but by name.  Order of attributes does not matter Attribute types are called   domains . Domains  consist of atomic values such as integers or  strings. No structured values such as lists or sets The order of tuples does not matter, a relation is a  set of tuples. The order of tuples resulting from a  relational query is undefined.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 To put it more formally: Domain a set of logically connected values,  e.g.  string integer real. Relation  R:   k  domains D 1 , . . ., D k Cardinality   = |R| Degree   Arity   k A set does not contain duplicates! k
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/07/2009 for the course CS 12601 taught by Professor Kewang during the Spring '09 term at Simon Fraser.

Page1 / 24

354.RelationalModel - Database Systems I The Relational...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online