<<

Informatik f¨ur Okonomen¨ II Fall 2010 The Systems Relational SL02 ◮ Attribute, domain, , , database

◮ Instance, schema

◮ ◮ The Relational Model Key constraints, entity constraints,

◮ Basic Relational Algebra Operators: σ,π, , , ,ρ ∪ × − ◮ Additional Relational Algebra Operators: , 1, ∩ ←

Inf4Oec10, SL02 1/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 2/48 M. B¨ohlen, ifi@uzh The Relational Model Relation Schema

◮ The relational model is based on the concept of a relation.

◮ A relation is a mathematical concept based on the ideas of sets. ◮ The relational model was proposed by Codd from IBM Research in ◮ R(A1, A2,..., An) is a relation schema the paper: ◮ A Relational Model for Large Shared Data Banks, Communications of ◮ R is the name of the relation. the ACM, June 1970

◮ The above paper caused a major revolution in the field of database ◮ A1, A2,..., An are attributes management and earned Codd the coveted ACM Turing Award. ◮ Example: ◮ The strength of the relational approach comes from the formal Customer(CustName, CustStreet, CustCity) foundation provided by the theory of relations.

◮ In practice, there is a standard model based on SQL. There are several important differences between the formal model and the practical model, as we shall see.

Inf4Oec10, SL02 3/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 4/48 M. B¨ohlen, ifi@uzh The Customer Relation Attribute

customer CustName CustStreet CustCity ◮ Each attribute of a relation has a name

Adams Spring Pittsfield ◮ The of allowed values for each attribute is called the domain of Brooks Senator Brooklyn the attribute Curry North Rye ◮ Attribute values are required to be atomic; that is, indivisible

Glenn Sad Hill Woodside ◮ The value of an attribute can be an account number, but cannot be a Green Walnut Stamford set of account numbers Hayes Main Harrison ◮ The attribute name designates the role played by a domain in a Johnson Alma Palo Alto relation:

Jones Main Harrison ◮ Used to interpret the meaning of the data elements corresponding to Lindsay Park Pittsfield that attribute Smith North Rye ◮ Example: The domain Date may be used to define two attributes named “Invoice-date” and “Payment-date” with different meanings Turner Putnam Stamford Williams Nassau Princeton

Inf4Oec10, SL02 5/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 6/48 M. B¨ohlen, ifi@uzh Domain Tuple

◮ A domain has a logical definition:

◮ Example: USA phone numbers are the set of 10 digit phone numbers valid in the U.S. ◮ A tuple is an ordered set (list) of values ◮ Angled brackets ... are used as notation; sometimes regular ◮ A domain also has a data-type or a format defined for it. parentheses (...) are used as well ◮ The USA phone numbers may have a format: (ddd)ddd-dddd where each d is a decimal digit. ◮ Each value is derived from an appropriate domain ◮ Dates have various formats such as year, month, date formatted as ◮ A customer tuple is a 3-tuple and would consist of three values, for yyyy-mm-dd, or as dd mm,yyyy etc. example:

◮ The special value is a member of every domain ◮ Adams, Spring, Pittsfield ◮ The null value causes complications in the definition of many operations

Inf4Oec10, SL02 7/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 8/48 M. B¨ohlen, ifi@uzh Relational Instance Example of a Relation

◮ r(R) denotes a relation r on the relation schema R ◮ Example: customer(Customer) relation name attributes ◮ A relation instance is a subset of the of the domains of its attributes. Thus, a relation is a set of n- account (a1, a2,..., an) where each ai Di AccNr BrName Balance ∈ ◮ Formally, given sets D1, D2,..., Dn a relation r is a subset of A-101 Downtown 500 D1 D2 ... Dn A-215 Mianus 700 × × × ◮ Example: tuples A-102 Perryridge 400 A-305 Round Hill 350 D = CustName = Jones, Smith, Curry, Lindsay,... 1 { } A-201 Brighton 900 D = CustStreet = Main, North, Park,... 2 { } A-222 Redwood 700 D = CustCity = Harrison, Rye, Pittsfield,... 3 { } A-217 Brighton 750 r = (Jones, Main, Harrison), (Smith, North, Rye), { (Curry, North, Rye), (Lindsay, Park, Pittsfield) } CustName CustStreet CustCity ⊆ × ×

Inf4Oec10, SL02 9/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 10/48 M. B¨ohlen, ifi@uzh Characteristics of Relations Database

◮ Relations are unordered, i.e., the order of tuples is irrelevant (tuples may be stored and retrieved in an arbitrary order) ◮ A database consists of a set of relations ◮ The attributes in R(A ,..., A ) and the values in t = v ,..., v are 1 n 1 n ordered. ◮ Example: Information about an enterprise is broken up into parts, with each relation storing one part of the information account ◮ account: stores information about accounts AccNr BrName Balance ◮ customer: stores information about customers A-101 Downtown 500 ◮ depositor: information about which customer owns which account A-215 Mianus 700 ◮ Storing all information as a single relation such as

A-102 Perryridge 400 ◮ bank(AccNr, Balance, CustName,...) A-305 Round Hill 350 results in

A-201 Brighton 900 ◮ repetition of information: e.g.,if two customers own the same account A-222 Redwood 700 ◮ the need for null values: e.g., to represent a customer without an A-217 Brighton 750 account

◮ There exist alternative definitions of a relation where attributes in a schema and values in a tuple are not ordered.

Inf4Oec10, SL02 11/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 12/48 M. B¨ohlen, ifi@uzh The Depositor Relation Checking...

depositor 1. What kind of object is X = (3) in the relational model? {{ }} CuName AccNr X is a database. Hayes A-102 2. Is r = (Tom, 27, ZH), (Bob, 33, Rome, IT ) a relation? Johnson A-101 { } No. Tuples have different schemas. Johnson A-201 Jones A-217 3. Are DB1 and DB2 identical ? Lindsay A-222 DB1= (1, 5), (2, 3) , (4, 4) {{ } { }} Smith A-215 DB2= (4, 4) , (2, 3), (1, 5) {{ } { }} Turner A-305 Yes. Relations are sets of tuples and not ordered

Inf4Oec10, SL02 13/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 14/48 M. B¨ohlen, ifi@uzh Checking... Checking...

4. Illustrate the following relations graphically: r(X , Y )= (1, a), (2, b), (3, c) { } s(A, B, C)= (1, 2, 3) { } r 6. What is the difference between a set and a relation? Illustrate with X Y s an example. 1 a A B C set: elements can be anything. 2 b 1 2 3 relation: all tuples must have the same schema. S = (1, r), (2, c , ), is a set but not a relation. 3 c { {⋆} •} 5. Determine the following objects:

◮ the 2nd attribute of relation r? X ◮ the 3rd tuple of relation r? there is no ordering ◮ the tuple in relation r with the smallest value for attribute X ? (1,a)

Inf4Oec10, SL02 15/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 16/48 M. B¨ohlen, ifi@uzh Summary of the Relational Constraints

◮ A domain D is a set of atomic data values. ◮ phone numbers, names, grades, birthdates, departments ◮ each domain includes the special value null ◮ With each domain a data type or format is specified. ◮ 5 digit integers, yyyy-mm-dd, characters ◮ Constraints are conditions that must be satisfied by all valid relation ◮ An attribute Ai describes the role of a domain in a relation schema. instances ◮ PhoneNr, Age, DeptName ◮ There are four main types of constraints in the relational model: ◮ A relation schema R(A1,..., An) is made up of a relation name R and a list of attributes. ◮ Domain constraints: each value in a tuple must be from the domain ◮ employee(Name, Dept, Salary), department(DName, Manager, Address) of its attribute ◮ Key constraints ◮ A tuple t is an ordered list of values t =(v1,..., vn) with vi dom(Ai ). ∈ ◮ Entity constraints ◮ t =(Tom, SE, 23K) ◮ constraints ◮ A relation r D1 ... Dn over schema R(A1,..., An) is a set of n-ary tuples. ⊆ × × ◮ r = (Tom, SE, 23K), (Lene, DB, 33K) Names Departments Integer { }⊆ × × ◮ A database DB is a set of relations. ◮ DB = r, s { } ◮ r = (Tom, SE, 23K), (Lene, DB, 33K) { } ◮ s = (SE, Tom, Boston), (DB, Lena, Tucson) { } Inf4Oec10, SL02 17/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 18/48 M. B¨ohlen, ifi@uzh Key Constraints/1 Key Constraints/2

◮ Let K R ⊆ ◮ K is a of R if values for K are sufficient to identify a unique tuple of each possible relation r

◮ By “possible” we mean a relation r that could exist in the enterprise ◮ K is a if K is minimal we are modeling. Example: CustName is a candidate key for Customer, since it is a ◮ Example: CustName, CustStreet and CustName are both { } superkeys{ of Customer, if no two} customers{ can possibly} have the superkey and no subset of it is a superkey. same name. ◮ Primary key: a candidate key chosen as the principal means of ◮ In real life, an attribute such as CustID would be used instead of identifying tuples within a relation CustName to uniquely identify customers, but we omit it to keep our examples small, and instead assume customer names are unique. ◮ Should choose an attribute whose value never, or very rarely, changes. ◮ E.g. email address is unique, but may change CustName CustStreet ID CustName CustStreet N. Jeff Binzm¨uhlestr 1 N. Jeff Binzm¨uhlestr N. Jeff Hochstr 2 N. Jeff Hochstr bad good

Inf4Oec10, SL02 19/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 20/48 M. B¨ohlen, ifi@uzh Entity Constraints Referential Integrity Constraint

◮ A relation schema may have an attribute that corresponds to the ◮ The entity constraint requires that the primary key attributes of primary key of another relation. The attribute is called a foreign each relation may not have null values. key. ◮ E.g. CustName and AccNr attributes of depositor are foreign keys to ◮ The reason is that primary keys are used to identify the individual customer and account respectively. tuples. ◮ Only values occurring in the primary key attribute of the referenced ◮ If the primary key has several attributes none of these attribute relation (or null values) may occur in the foreign key attribute of the values may be null. referencing relation.

◮ Other attributes of the relation may also disallow null values ◮ In a graphical representation of the schema a referential integrity although they are not members of the primary key. constraint is often displayed as a directed arc from the foreign key attribute to the primary key attribute. ID Name CustStreet ID Name CustStreet 1 N. Jeff Binzm¨uhlestr 1 N. Jeff Binzm¨uhlestr ID CustName CStreetID StreetID Street T. Hurd Hochstr 2 T. Hurd Hochstr 1 N. Jeff 2 2 Binzm¨uhlestr bad good 2 N. Jeff 4 3 Hochstr bad (good if, e.g., 4 is replaced by 3)

Inf4Oec10, SL02 21/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 22/48 M. B¨ohlen, ifi@uzh Checking... Query Languages

1. Determine keys of relation R: R ◮ Language in which user requests information from the database. X Y Z ◮ Categories of languages 1 2 3 ◮ Procedural: specifies how to do it; can be used for 1 4 5 ◮ Declarative: specifies what to do; not suitable for query optimization 2 2 2 ◮ Pure languages:

◮ Relational algebra (procedural) ◮ Tuple (declarative) X is not a key ◮ Domain relational calculus (declarative)

Y is not a key ◮ Pure languages form underlying basis of query languages that people Z could be a key use. XY could be a key

Inf4Oec10, SL02 23/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 24/48 M. B¨ohlen, ifi@uzh Relational Algebra

◮ The relational algebra is a procedural language The Basic Relational Algebra ◮ The relational algebra consists of six basic operators

: σ ◮ project: π ◮ : ∪ ◮ set difference: ◮ select σ − ◮ Cartesian product: × ◮ project π ◮ rename: ρ

◮ union ◮ The operators take one or two relations as inputs and produce a new ∪ ◮ set difference relation as a result. − ◮ Cartesian product ◮ This property makes the algebra closed (i.e., all objects in the × relational algebra are relations). ◮ rename ρ

Inf4Oec10, SL02 25/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 26/48 M. B¨ohlen, ifi@uzh Select Operation Project Operation

◮ Notation: σp(r) ◮ Notation: πA1,...,Ak (r) ◮ p is called the selection predicate ◮ The result is defined as the relation of k columns obtained by

◮ Definition: t σ (r) t r p(t) erasing the columns that are not listed ∈ p ⇔ ∈ ∧ ◮ Definition: t π (r) x(x r t = x[A ,..., A ]) ◮ p is a formula in propositional calculus consisting of terms ∈ A1,...,Ak ⇔∃ ∈ ∧ 1 k connected by : (and), (or), (not) ◮ There are no duplicate rows in the result since relations are sets ∧ ∨ ¬ ◮ Example: σBranchName=“Perryridge”(account) ◮ Example: πAccNr,Balance (account)

◮ Example: σA=B D>5(r) ◮ Example: πA,C (r) r ∧ r πA,C (r) A B C D σA=B D>5(r) A B C ∧ A C α α 1 7 A B C D α 10 1 α 1 α β 5 7 α α 1 7 α 20 1 β 1 β β 12 3 β β 23 10 β 30 1 β 2 β β 23 10 β 40 2

Inf4Oec10, SL02 27/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 28/48 M. B¨ohlen, ifi@uzh Union Operation Set Difference Operation

◮ Notation: r s ∪ ◮ Definition: t (r s) t r t s ◮ Notation: r s ∈ ∪ ⇔ ∈ ∨ ∈ } − ◮ For r s to be valid r and s must be union compatible: ◮ Definition: t (r s) t r t / s ∪ ∈ − ⇔ ∈ ∧ ∈ 1. r and s must have the same arity (same number of attributes) ◮ Set differences must be taken between (union) compatible relations. 2. The attribute domains must be compatible (example: 2nd of ◮ r and s must have the same arity r deals with the same type of values as does the 2nd column of s) ◮ attribute domains of r and s must be compatible ◮ Example: π (depositor) π (borrower) CuName CstName ◮ Example: r s ∪ − ◮ Example: r s r ∪ s r s r s A B r ∪ − s A B A B A B A B α 1 A B α 1 α 2 α 1 α 1 α 2 α 2 α 2 β 3 β 1 α 2 β 1 β 3 β 1 β 1 β 3

Inf4Oec10, SL02 29/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 30/48 M. B¨ohlen, ifi@uzh Cartesian Product Operation Rename Operation

◮ Notation: r s × ◮ Allows us to name the results of relational algebra expressions by ◮ Definition: t (r s) x r y s t = x y ∈ × ⇔ ∈ ∧ ∈ ∧ ◦ setting relation and attribute names. ◮ We assume that the attributes of r and s are disjoint. If the attributes are not disjoint, then renaming must be used. ◮ The rename operator is also used if there are name clashes. ◮ Various flavors: ◮ Example: r s × r s ◮ ρr (E) changes the relation name to r. × ◮ ρ (E) changes the relation name to r and the attribute A B C D E r(A1,...,An) names to A1,..., Ak . s α 1 α 10 a ◮ ρ(A1,...,An)(E) changes attribute names to A1,..., Ak . r C D E α 1 β 10 a ◮ Example: ρ (r) A B s(X ,Y ,U,V ) α 10 a α 1 β 20 b r s α 1 β 10 a α 1 γ 10 b A B C D X Y U V β 2 β 20 b β 2 α 10 a γ 10 b β 2 β 10 a α α 1 7 α α 1 7 β 2 β 20 b β β 23 10 β β 23 10 β 2 γ 10 b

Inf4Oec10, SL02 31/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 32/48 M. B¨ohlen, ifi@uzh Composition of Operations Banking Example

◮ Since the relational algebra is closed, i.e., the result of a relational algebra operator is always a relation, it is possible to nest expressions. ◮ branch (BranchName, BranchCity, Assets)

◮ Example: σA=C (r s) ◮ customer (CustName, CustStreet, CustCity) × r s × ◮ account (AccNr, BrName, Balance) A B C D E s ◮ loan (LoanNr, BraName, Amount) α 1 α 10 a σA=C (r s) r C D E α 1 β 10 a × A B C D E ◮ depositor (CuName, AccNr) A B α 10 a α 1 β 20 b α 1 α 10 a α 1 β 10 a α 1 γ 10 b β 2 β 10 a ◮ borrower (CstName, LoanNo) β 2 β 20 b β 2 α 10 a β 2 β 20 b γ 10 b β 2 β 10 a β 2 β 20 b β 2 γ 10 b

Inf4Oec10, SL02 33/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 34/48 M. B¨ohlen, ifi@uzh

Example Queries/1 branch (BranchName, BranchCity, Assets) Example Queries/2 branch (BranchName, BranchCity, Assets) customer (CustName, CustStreet, CustCity) customer (CustName, CustStreet, CustCity) account (AccNr, BrName, Balance) account (AccNr, BrName, Balance) ◮ Find the names of all loan (LoanNr, BraName, Amount) loan (LoanNr, BraName, Amount) ◮ Find all loans of over $1200 depositor (CuName, AccNr) customers who have a loan depositor (CuName, AccNr) borrower (CstName, LoanNo) at the Perryridge branch. borrower (CstName, LoanNo) σAmount>1200(loan)

πCstName (σBraName=‘Perryridge′ ( σLoanNo=LoanNr (borrower loan))) ◮ Find the loan number for each loan of an amount greater than $1200 ×

πLoanNr (σAmount>1200(loan)) ◮ Find the names of all customers who have a loan at the Perryridge branch but do not have an account at any branch of the bank.

◮ Find the names of all customers who have a loan, an account, or πCstName (σBraName=‘Perryridge ( both, from the bank ′ σ (borrower loan))) LoanNo=LoanNr × π (borrower) π (depositor) CstName ∪ CuName − πCuName (depositor)

Inf4Oec10, SL02 35/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 36/48 M. B¨ohlen, ifi@uzh Example Queries/3 Example Queries/4

◮ Find the largest account balance ◮ Find the names of all customers who have a loan at the Perryridge branch. ◮ Idea for solution: ◮ Find those balances that are not the largest (by comparing each ◮ Query 1 balance with all other balances) ◮ Use set difference to find those account balances that were not found πCstName (σBraName=‘Perryridge′ ( σ (borrower loan))) in the earlier step. LoanNo=LoanNr × ◮ The query is: ◮ Query 2 πBalance (account) πCstName (σLoanNo=LoanNr (

(σBraName=‘Perryridge′ (loan)) borrower)) − × π (σ (account ρ (account))) Balance Balance

Inf4Oec10, SL02 37/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 38/48 M. B¨ohlen, ifi@uzh Formal Definition of Relational Algebra Expressions

◮ A basic expression in the relational algebra consists of either one of the following: Additional Relational Algebra Operators ◮ A relation in the database ◮ A constant relation

◮ Let E1 and E2 be relational algebra expressions; the following are all relational algebra expressions: We define additional operations that do not add expressive power to the ◮ E1 E2 ∪ relational algebra, but that simplify common queries. Thus, these are ◮ E E 1 − 2 redundant relational algebra operators. ◮ E E 1 × 2 ◮ Set intersection ◮ σp(E1), p is a predicate on attributes in E1 ∩ ◮ πs (E1), s is a list consisting of some of the attributes in E1 ◮ Join 1

◮ ρx (E1), x is the new name for the result of E1 ◮ Assignment ←

Inf4Oec10, SL02 39/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 40/48 M. B¨ohlen, ifi@uzh Set Intersection Operation Theta Join

◮ Notation: r 1θ s ◮ Notation: r s ◮ Let r and s be relations on schemas R and S, respectively. θ is a ∩ ◮ Definition: t (r s) t r t s boolean condition on the attributes of r and s. ∈ ∩ ⇔ ∈ ∧ ∈ ◮ Precondition: union compatible ◮ r 1θ s is a relation on schema that includes all attributes from ◮ r, s have the same arity schema R and all attributes from schema S. ◮ attributes of r and s are compatible ◮ Example: ◮ Note: r s = r (r s) ◮ R(A, B, C, D) and S(X , Y , Z) ∩ − − ◮ r 1B

Inf4Oec10, SL02 41/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 42/48 M. B¨ohlen, ifi@uzh Equi- Natural Join

◮ Notation: r 1eq s ◮ Notation: r 1 s ◮ Let r and s be relations on schemas R and S, respectively. eq is a ◮ Let r and s be relations on schemas R and S, respectively. boolean condition on the attributes of r and s that includes equality ◮ Attributes that occur in r and s must be identical. conditions only. ◮ r 1 s is a relation on a schema that includes all attributes from ◮ r 1eq s is a relation on a schema that includes all attributes from schema R and all attributes from schema S that do not occur in schema R and all attributes from schema S. schema R. ◮ Example: ◮ Example:

◮ r 1B=X A=Z s with R(A, B, C, D) and S(X , Y , Z) ◮ r 1 s with R(A, B, C, D) and S(B, D, E) ∧ ◮ Schema of result is (A, B, C, D, X , Y , Z) ◮ Schema of result is (A, B, C, D, E) ◮ Equivalent to: σB=X A=Z (r s) ◮ Equivalent to: πA,B,C,D,E (σB=Y D=Z (r ρ(Y ,Z,E)(s)) ∧ × ∧ × r s r s r 1 s A B C D X Y Z r 1B=X A=Z s ∧ A B C D B D E A B C D E A B C D X Y Z α 1 α a 1 a α α 1 α a 1 a α α 1 α a α β 2 γ a 3 a β α 1 α a 1 a α β 2 γ a 3 a β α 1 α a γ γ 4 β b 1 a γ α 1 γ a 1 a α γ 4 β b 1 a γ α 1 γ a α α 1 γ a 2 b δ δ 2 β b 2 b δ α 1 γ a 2 b δ α 1 γ a γ δ 2 β b 3 b ǫ δ 2 β b 3 b ǫ δ 2 β b δ

Inf4Oec10, SL02 43/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 44/48 M. B¨ohlen, ifi@uzh Assignment Operation Bank Example Queries/1

◮ The assignment operation ( ) provides a convenient way to express complex queries by breaking← them up into smaller pieces. ◮ Find all customers who have an account and a loan. ◮ Write query as a sequential program consisting of ◮ a series of assignments πCustName (borrower) πCustName (depositor) ◮ followed by an expression whose value is displayed as a result of the ∩ query.

◮ Assignment must always be made to a temporary relation variable. ◮ Find the name of all customers who have a loan at the bank and the ◮ Example: Write difference from slide 38 as loan amount temp1 π (account) ← Balance temp2 π (σ (account ρ (account))) Sol2: πCstName,Amount (ρ(CstName,LoanNr)(borrower) 1 loan) ← Balance Balance

◮ The result to the right of the is assigned to the relation variable on the left of the . ← ←

Inf4Oec10, SL02 45/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 46/48 M. B¨ohlen, ifi@uzh Bank Example Queries/2 Summary

◮ The Relational Model

◮ attribute, domain, tuple, relation, database, schema ◮ Find all customers who have an account from at least the “Downtown” and the “Uptown” branches. ◮ Basic Relational Algebra Operators ◮ Selection σ

◮ Solution: ◮ π ◮ Union ∪ π (σ (depositor 1 account)) ◮ Difference CuName BrName=‘Downtown′ − ◮ Cartesian product × ∩ ◮ Rename ρ πCuName (σBrName=‘Uptown′ (depositor 1 account)) ◮ Additional Relational Algebra Operators

◮ Join (theta, natural) Join ◮ Assignment ←

Inf4Oec10, SL02 47/48 M. B¨ohlen, ifi@uzh Inf4Oec10, SL02 48/48 M. B¨ohlen, ifi@uzh