Unit03-RelationalModel-4up - Learning Goals Goals given an...

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

View Full Document Right Arrow Icon
The Relational Model ± ext: hapter 3 Text: Chapter 3 © G. Tsiknis; Based on Ramakrishnan & Gehrke, DB Management Systems earning Goals Learning Goals iven an ER model design a minimum number of correct ± given an ER model, design a minimum number of correct tables that captures the information in it ± given an ER model with inheritance relations, weak entities and aggregations, design the right tables for it ± given a table design, create correct tables for this design SQL including primary and foreign key constraints in SQL, including primary and foreign key constraints ± compare different table designs for the same problem, identify errors and provide corrections Unit 3 2 istorical Perspective Historical Perspective ± Introduced by Edgar Codd (IBM) in 1970 ± Most widely used model today. ¾ Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. t ll hi hi l t k ± “Legacy systems” are usually hierarchical or network models (i.e., not relational) ¾ e.g., IMS, IDMS, … ± Competitor: object-oriented model ¾ ObjectStore, Versant, Ontos synthesis emerging: bject lational model ¾ A synthesis emerging: object-relational model o Informix Universal Server, UniSQL, O2, Oracle, DB2 ± Recent competitor: XML data model Unit 3 3 ain Characteristics of the Relational Model Main Characteristics of the Relational Model xceedingly simple to understand ± Exceedingly simple to understand ¾ main abstraction is represented as a table ± Simple query language separate from application language ± Lots of bells and whistles to do complicated things Unit 3 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Structure of Relational Databases ± Relational database : a set of relations ± Relation: made up of 2 parts: ¾ Schema : specifies name of relation, plus name and domain (type) of each field (or column or attribute ). o e.g., Student ( sid : string, name : string, address : string, phone : string, major : string). ¾ Instance : a table, with rows and columns. Rows = cardinality, #Rows cardinality, ¾ #fields = dimension / arity / degree ± Can think of a relation as a set of rows or tuples (i.e., all ws are distinct rows are distinct) ± Relational Database Schema: collection of schemas in the database Unit 3 5 ± Database Instance: a collection of instances of its relations xample f a elation stance attribute, column name, Example of a Relation Instance d ame address hone ajor Student field name sid name address phone major 99111120 G. Jones 1234 W. 12 th Ave., Van. 889-4444 CPSC relation name 92001200 G. Smith 2020 E. 18 th St., Van 409-2222 MATH 94001020 A. Smith 2020 E. 18 th St., an 222-2222 CPSC tuple, row, cord Van 94001150 Campeau J. null null null domain record ² Cardinality = 4, degree = 5, all rows distinct rder of rows isn’t important attribute column, field value Unit 3 6 ² Order of rows isn t important ² Order of fields may be important ormal Structure Formal Structure ± Formally, an n-ary relation r is a set of n-tuples (a 1 , a 2 ,…,a n ) where a i is in D i , the domain (set of allowed values) of the i-th attribute.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/28/2010 for the course COMM 296 taught by Professor Dasgupta during the Spring '08 term at The University of British Columbia.

Page1 / 12

Unit03-RelationalModel-4up - Learning Goals Goals given an...

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

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