Sie sind auf Seite 1von 68

r ‘ 


    
r 
           
      
r 
  
r   
r     
r ‘        
 
r ‘       
  
r           
      
r !" ‘   ‘   # 
         
   $
r  
r   %& '
r           
r  "    
r       
r (   
r          
r           
r           
r )     
r )   
   
 
r                
"   $
r STUDENT.AGE >15
r [ STUDENT.CLASS ==cs43005) 
(STUDENT.PRIOR_CLASS ==cs31001)
r               
     $
r (          $
          $
60¶s

70's
Hierarchical Network

80's
Choice for most new
Relational applications
90¶s

Object Bases
Knowledge Bases
now
r  
       
 
            
 
r     [          
   &$( 
 
"    
r R           
     
r   * 
   +      
 
  #(       #
(    ,    ,     $
r ,   +        
     $‘     $
    

r  * +        
      
r   + 
  
r  
   
  &     


r -   

r     
r       
r  - 
r =  
r % ,
r * 
r . /    
r 01   
¦ 

  ¦   

1

 

$ %¦ $2


%¦
r !   
r !    
r 3, 4 
r 5      
r ‘" 
r "   
r    
r     "  
1234567 Gyn Clinic 2 Main St.

Sandiego Secretary 305-2500

Gyn Clinic Ms Smith 8AM-5PM

305-1000 Service
Pap
Gyn Visit Dr. Jones Beeper 34
r    
r (    
r . 

o O 
   O
 !"
o      # $ %  & ' 
r  
r    
r  
r 
r ) 
r ! (  
r * (  

'(# * #   

 )   


)
'(#
& &

 " 

'(# )    
r )  '  &
r *  #    
 &#   ,6.(%!1!
)*.6!
r *  
#     
  $$515!
r       
r 3„         
   $4¦

r a          $


+,-
 $ #  % O 

 #   " 

O 
O 

'
O 

 
O 

&
%
'

     .  ' '    $/


%
"  
$(   
   
/
  0'   1

&
%
'

&
%
    '  #  '/
&  $
&
%
'
 

  #& # $


 "

' ( %


'
r .' '

r .' '

r ' '
r  7" 8
r % 7%  $8
r  9 
r 7: 9%8
r 3„„     /     
  $4¦

r ,   ;
r 3      
„ $.      

„ $4¦

r ,   ;
r 3 „„  „   '    
 $4¦

r ,   ;
r   „
  ,         
    $

r ,   ;
r  Ë ! 7 8
r . / Ë *
r     Ë    7‘ 8
r     Ë *   
r 
o $   # $2 *  &(
/(/  %O334"
o      '' 5

o object-oriented model #  $2 *  &  


 6 
&     $ &$  60  *78!1
o object-oriented  
      
 *  9  ·

o object-relational model #   &  


 6 
$2 *  '  60 !81
o object-relational  
    $  
: 
r  / 
r  /      
  

r  /     #    
r   # 
,  #
 
  # 

r   
r
      
r  /   # /   <  
r  /       
r " / #   / #"   
 
r    #  #   
r  
 
r       
r   <   /
Object-Oriented Model - Structures
*%
5
class '(# * # ;
type tuple 0'(# ) (
<%
set 0<%
enumeration ;  < #'  =1
& *&  &  "*&  &  1
method  # 0 <*& &   <*"&  1=
class     *'(# inherit '(# * # ;
type tuple 0" *.   (1
method # (*" *.  0"  (1$  =
>? # #  #   # $
    *'(# 6?>
>?<#  #   " %     *'(#  
?>
>?  " %# (*" *.  ?>
r =1 m„   
r =1          7  8
    
r =1  =1 
r   9   „ 
r 01    =1
r 01      
m „
r - 3= ,1473=148 01
7       8
r       
´&  @
´&  /@
´/" @,8DEF7´>/" @
´>&  /@
´&  / @
´'
/ @ ( ´>'
/ @
´(" / @O ´>(" / @
´ ''5@//´> ''5@
´>&  / @
´&  / $@,78A,,8´>&  / $@
´&  / 5" BCC>@
´ &  >@
´>&  @
r   
r ‘"       
r       
r    
r  
 '    
r -, 
r (     
r >  
r (9.  

r  '     
"  #;   
¦$      $
r  "      
  $
$) &      , $
r 51?3     ,$4
$    $
$
r          

     9     
           
   
r      

   
    "       
             
          
       
         
  
   $
r  
  
r  &     
 
r [„ „  &    
  
r [„ „ „

„
r   

 „
„ „
 „ =
          
      
9 
    
   7(! (8
r O
 „  

 „
„
 
 „ 
-     "  
        "  3
4      3 @
  $
r  

 „
„„ 
 „ -  
          
r ) 
,A 8 G ,A 8 G

$ 2 G8 AAAAA8HAAA 2


4 8 AAA8EH /////////
r  
¦
%7¦8
78
‘ " 78#
¦ 
%7¦8
:'A 78
=)‘ " 7 8#
¦a !%'
%7 8
78
‘ " 7B 8
"<
:'A 78
=)‘ " 7 8#
/////
9<,9<%

O & 
9<
' 

#
 
 
 (
r     17 18
r    17 18  (
r = 1( 
r     
r a 
r 5) 
r   #

r .  
r 
r   
r ‘ 
r 
r    (  
Faculty Department

Name Dept Dept Chair




 CT Chair
FROM Faculty, Department
WH R Faculty.name = ³Ken Noname´
AND Faculty.Dept = Department.Dept
Data definition language (DD ~ like type definitions in C or C++
Data Manipulation anguage (DM
uery (
 CT
DAT < relation name >

T <attribute> = < new-value>
WH R <condition>
r         
    
r !$$
create table 
„ 7

„ m char7¦8
   integer8
r 1         
 „  „
 
r         7 $$ 
   8
r     
r  „
   „
 
r        
             
r a "      
r 1     
      
r    
r )+         & 
     
r %+         & 
          
r 51     &
C, C++, Fortran, isp, COBO

Application prog.
Calls to
DBM

DB

ocal Vars
(Memory

(
torage

Host language is completely general

uery language²less general "non procedural" and


optimizable
r     
  
     #    
      
  @     
 $
r       C    
r   
r        
r       
r =          
r        
r       
r      
  & 
r %
 '  ,       
,
     
r   ) + ,      
    ,   
r       ,
    
    ,    
 
r     +        
            
  ,
r  +
    &  
  1 1
r .  + ‘    
   
&      & $
   &"    &

   $
r „  „
       
        
r   '       
        7 8    
   7$$     
  8     $
r '       
         
     $
r     

       '
 
        
 &         $
r       
   , 
r      
r        
  
r ‘         
 7 /    $8    
  $
r (         " 
$(        "
         
 , $
r      
         
       
 
   $
r       
         
       
r        
           

       
r (         
            
 
r *    + .  +  
       $
r (       $- ( 
 (       
  
$
r     51'
      
  ,   3 4    
  $
r *     3 / '   4
  $
r    3 / ' 4       
    "    ..   $
r         
r  
r     
r    
r    
r >    !* .. 
r *  * 
r            
         $
r Entity Ȃ            
    
r !       attributes
r Relationship Ȃ         
   
r Entity Set Ȃ           
   
r Relationship Set Ȃ          
!"    '   
r          
r  +     
 $!  
NULL
$
r   +       
 
  $
r *        
 
r      $!  
       $
Relational model is good for:
arge amounts of data ²> simple operations
Navigate among small number of relations

Difficult Applications for relational model:


r V
 Design (CAD in general
r CA

 Graphical Data
A ADD R
A
FA
C Adder
A

ADD R

Bill of Materials or
transitive closure
Attributes

Name
treet City gpa

tudent-id
r !"      
192-83-7465 Johnson Alma 3.6
alo Alto
019-28-3746
mith North 2.7
Rye
192-83-7465 Johnson Alma 3.2
alo Alto
321-12-3123 Jones Main 4.0
Harrison
019-28-3746
mith North 3.45
Rye