cs-1q im 2002-03 revision 21 january 2003 1 revision cs-1q im lecture 10 phil gray simon gay

14
1 CS-1Q IM 2002-03 Revision 21 January 2003 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

Upload: holly-sims

Post on 29-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

1CS-1Q IM 2002-03 Revision 21 January 2003

Revision

CS-1QIM Lecture 10

Phil GraySimon Gay

Page 2: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

2CS-1Q IM 2002-03 Revision 21 January 2003

The Class Test Friday 31st January, 1.30 - 2.45 pm,

Hunter Halls (East and West) Two questions: ANSWER BOTH!

one question on HCI, of similar structure to thepractice questions and past exam questions

one question on Mathematics and Information Management

30 minutes per question, + 15 minutes reading/checking time

Page 3: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

3CS-1Q IM 2002-03 Revision 21 January 2003

A Word from Chris about HCI

You need to know what a mental model is.

Revise the section on Elicitation.

Page 4: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

4CS-1Q IM 2002-03 Revision 21 January 2003

Overview Basic Division between

Information Management (~ 75-80%) Sets & Relations (~20-25%)

Page 5: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

5CS-1Q IM 2002-03 Revision 21 January 2003

Types of Questions objective content

what is define list explain the difference between

worked examples e.g., ER diagrams, queries questions on sets & relations

critical question compare, assess explain the relationship between

Page 6: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

6CS-1Q IM 2002-03 Revision 21 January 2003

Content Lecture 1: Issues in Managing Data Lecture 2: Data Modelling & ER Diagrams Lecture 3: The Relational Data Model Lecture 4: Creating Database Tables from an

ER Diagram Lectures 5-6: Sets and Relations Lecture 7: Querying Relational

Databases Lectures 8-9: SQL

Page 7: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

7CS-1Q IM 2002-03 Revision 21 January 2003

Content Data, information and knowledge Databases & DBMSs

definitions layered architecture

ER Modelling what’s a model? be able to define the elements be able to produce a simple ER diagram

Page 8: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

8CS-1Q IM 2002-03 Revision 21 January 2003

Content Relational Model

be able to define the elements keys constraints transforming from / comparing to ER Model

Sets & Relations based around the tutorial exercises

Page 9: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

9CS-1Q IM 2002-03 Revision 21 January 2003

Content Querying Relational Databases

understand the operations be able to relate them to sets & relations

SQL know the syntax & semantics be able to write and explain simple queries

Page 10: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

10CS-1Q IM 2002-03 Revision 21 January 2003

Model Answer (a)

(3 marks) A database is one or more structured sets ofpersistent data, usually held on computer and associated withsoftware to update and query the data. A database managementsystem is a suite of programs that manage databases (or aninformation system where the data may be shared by differentapplications).

Other functions:(1) multiple views of the same data(1) controlled concurrent access to data(1) management of security and integrity

Page 11: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

11CS-1Q IM 2002-03 Revision 21 January 2003

Model Answer (b)

Widget Warehousestored in1N

price

description

typeidentifier identifier address

street city postcode

1 mark for entities, 1 mark for attributes, 1 mark for compositeattribute, 1 mark for relationship, 0.5 marks for cardinality,0.5 marks for total participation of widgets,1 mark for primary keys

Page 12: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

12CS-1Q IM 2002-03 Revision 21 January 2003

Model Answer (b) (continued)

(2 marks) The association should be represented by includingan attribute in the Widget table to hold a foreign keyreferring to the primary key in the Warehouse table.

Page 13: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

13CS-1Q IM 2002-03 Revision 21 January 2003

Model Answer (c)

(i) (1 mark) True, because stands for the empty set, and theempty set is a subset of every set.

(ii) (1 mark) True, because A is the set of all elements of U thatare greater than 2. The order of listing elements is notsignificant.

(iii) (1 mark) 3, 1

Page 14: CS-1Q IM 2002-03 Revision 21 January 2003 1 Revision CS-1Q IM Lecture 10 Phil Gray Simon Gay

14CS-1Q IM 2002-03 Revision 21 January 2003

Model Answer (c) (iv)

(2 marks) 1

2

3

4

Not transitive because, for example, we have tuples<1,2> and <2,3> but not <1,3> (there are 2 other examples)

Transitive means: if xRy and yRz then xRz.