WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I...

6
WP3 Authorisation Steve Fisher / RAL 2/4/2003 <s.m.fisher@ rl .ac. uk >

Transcript of WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I...

Page 1: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

WP3

Authorisation

Steve Fisher / RAL2/4/2003

<[email protected]>

Page 2: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

Steve Fisher/RAL - 2/4/2003Authorisation 2

WP3

I don’t think I disagree(much) with Linda• Control must be at the level of views on the

database– Very compact– Very powerful

Page 3: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

Steve Fisher/RAL - 2/4/2003Authorisation 3

WP3Example - people

• Doctor: Select sanity for his patients• Anybody: select average salary for people in GB• Friend: phone number

People

Name Address Phone # Salary Sanity Doctor

Fred GB 1 6 0.1 Seuss

Bill CH 3 60 0.5 Spock

Mary D 4 50 0.9 Spock

Page 4: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

Steve Fisher/RAL - 2/4/2003Authorisation 4

WP3Example - doctor

• View– Name, Address, Phone, Sanity from People where Doctor =

“Spock”– Name, Address, Phone, Sanity from People where Doctor = “{DN}”

• Good Query– Select Name, Sanity from People where Doctor = “Spock”

• Bad Query– Select Name, Salary from People where Doctor = “Spock”

• What about– Select Name, Sanity from People where Name = “Bill”

People

Name Address Phone # Salary

Sanity Doctor

Fred GB 1 6 0.1 Seuss

Bill CH 3 60 0.5 Spock

Mary D 4 50 0.9 Spock

Doctor: Select sanity for his

patients

Page 5: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

Steve Fisher/RAL - 2/4/2003Authorisation 5

WP3Example - doctor

• View– Name, {AGGREGATE}(Salary) where Country = “{*}”

• Good Query– Select Avg(Salary) from People where Country = “GB”

People

Name Address Phone # Salary

Sanity Doctor

Fred GB 1 6 0.1 Seuss

Bill CH 3 60 0.5 Spock

Mary D 4 50 0.9 Spock

Anybody: select average salary for people in GB

Page 6: WP3 Authorisation Steve Fisher / RAL 2/4/2003. WP3 Steve Fisher/RAL - 2/4/2003Authorisation2 I don’t think I disagree (much) with Linda Control must be.

Steve Fisher/RAL - 2/4/2003Authorisation 6

WP3Example - doctor

• View– P.Name, P.Phone, P.Address from People P, Friend F where

P.Name = F.Name and F.Friend = “{DN}”

• Good Query– Select P.Name, P.Phone from People P, Friend F where P.Name =

F.Name and F.Friend = “Mary” and P.Name=“Bill”

• Bad Query– Select P.Name, P.Phone from People P, Friend F where P.Name =

F.Name and F.Friend = “Bill” and P.Name=“Mary”

People

Name Address Phone # Salary

Sanity Doctor

Fred GB 1 6 0.1 Seuss

Bill CH 3 60 0.5 Spock

Mary D 4 50 0.9 Spock

Friend: phone number

Friend

Name Friend

Fred Bill

Bill Fred

Bill Mary