��� ������
2007�- ��-IBM����-������������� 2
�3� ������
3.1 ������ ��
3.2������ ����
3.3������—����
3.4�������SQL’92
2007�-���-IBM����-������������� 3
3.1 ��� ����q � � ����
������
���
2007�- ��-IBM����-������������� 4
3.1 ��������q ��������
�������
����
l ������������
l ������! �
2007�- ��-IBM����-������������� 5
3.1 ��������q �*(��*)�1
�(����
�'0��
��$%
l #+��$�%��2/�
�#+,��$
l ����,�(��� *
l �!�-4(��&"�
l ���(��53.
2007�- ��-IBM����-������������� 6
3.1 ��������q �%!��%#)�
�!����
� ( �
����
�!���&�
l !��������$�'"
l �*���&
2007�- ��-IBM����-������������� 7
3.1 ��������q �������"
�������
��!��
����
�����
������
2007�- ��-IBM����-������������� 8
3.1 ��������q �" ��"!&�
� ����
��% �
����
� ���#�
������
��$'#�
20078 - L-IBME5 C- 2 7I 71 9
3.1 3 9 A
q �85&(87�@�
�5&%�#�
�3?�
��.1
�5&�*:�
�)," 2
�'=D:�
�F!���
l5&GB;SQL�F!Ø / 0 ���<�0/
F
Ø / 0 ��0/ F�
0
Ø / 0 0 0F9�
0/ F�0/
Ø /�A 6:�0/ $>
F�0/
l0/ B;F�E�4�85&(
87+C�<��-
2007�- ��-IBM����-������������� 10
3.1 ��������q �+)� +*�/�
�)�����
�'.�
��$%
�)��",�
�!#� &
��-0,�
�1����
���(�$
l Client/Server (C/S)l Browser/Server (B/S)l��()�
l ……
2007��-�/7-IBM* 2'-���0)�&����+ 11
3.1 �+���+-!5q �., #.-�2�
�, ����
�*1�
��'(
�, �%/�
�$&��)
�"03/�
��4� ��
���+�'
!�/
�"�
CLI�Call Language Interface�E-SQL�Embedded SQL�
.,"�
4'18
CORBAODBC / JDBCCGI�ASP�JSP(�Web�
63���%.,"��$��18�� �#+-$���
2007�- ��-IBM����-������������� 12
3.1 ��������q �30!$32�7�
�0! ���
�.6��
��*,
�0!�'4�
�&(��-
�#594�
��:����
�� /�*
"�4
+1�)��*%8
2007�- ��-IBM����-������������� 13
�3� ������
3.1 ������ ��
3.2������ ����
3.3������—����
3.4�������SQL’92
3.2 �����������
q���‘��! ’�1974��q������12���!�1985��q�������! �����������
2007�-���-IBM����-�������� �� 14
2007��-��!-IBM�� �-�� ���� ���� 15
3.2 ��������"�
q"/=<�1974%IFIP�:�
Ø.���,�!7
Ø.�8�,�+0
�'����>
�! $��
Ø)3� ;2�� 4��
�1(9�&-69�3>=�
�>�5*�#��� �*���#
2007BD- -IBM - SM O 16
3.2 O O
q '��*-�12%0��<�1985��,)<8
Ø �*#���$5,) 3�7��2�(2�4��;�:+�
4;��6=��6=;��!/:��
Ø #������",)137���=9�*.�
��� ;�*&
§ 2 .,� .. ., .. 1. …§ � ., 1. , …
2007 - -IBM 1 - 2 17
3.2 6��CYP
Ø K1�TL*��;H#/���[UM(/�\�%�C="$W-G�NZ="
�'� 5�8<����W���A
�8O�����
?O��193&�,1427X!>210@ �1417X9�200:I4140�O!>230QB�139?OR!183FJ 138SV.+��2)D�E/�
‘00
4.
2007 - -IBM - 4 18
3.2 �+��!��,)
Ø �+�null value�– “ #$�����*��+– !�% �&���+���
§ �+���(�
§ �&�+(��"�����
§ �&�+�'�������(�
3 .
Ø
Ø
2007 - ir-IBM n - e c 19
3.2 s
��� ���)"�
Ø &�!�(��)"� ��%����
����
�� ��
���*
�$�#�
���'
���
•• 5 .
.
• ( )• o
a
2007�-���-IBM����-�������� �� 20
3.2 �����������
6. "'�,<:7. �����!��.��>8. *�$���-9. ��$���-10.$�(;-<:
Ø &� �$�(;-9#�2��
11.����-Ø $������4+8635�/
12.)%�8:Ø &��$�=701�
2007�-���-IBM����-�������� �� 21
3.2 �����������
q�"�������
� ��"#"
–��������"–�)12�(&'��%�
� ���"#"
–��������"–�)12�(&'��%�
� !��"#"
–$ ����12�(&
2007�- ��-IBM����-������������� 22
�3� ������
3.1 ������ ��
3.2������ ����
3.3������—����
3.4�������SQL’92
2007�- ��-IBM����-����������� 23
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
2007-���-IBM����-����������� � 24
3.3.0 ����
3.3.0.1 ���� §�
§�
§��
3.3.0.2 ����§����������
§�����
3.3.0.3 ��������
3.3.0 ����
����������
�� ���
Relation Table File of Records
Attribute Column Field
Tuple Row Record
Schema Table Heading Type of Record
����� Terminology �������
Table Heading: a set of named columns about a table
0.00KyotoACMEc006
8.00DuluthACMEc004
8.00DallasAlliedc003
12.00DallasBasicsc002
10.00DuluthTipTopc001
discntcitycnamecid
CUSTOMERS
table
table name
column
column name
table heading
row
2007"$-+AH-IBM<�G9-����F;/7��'.= 27
3.3.0.1 �=,)?0
1. ���
q �@D�:8D�5>&
Ø D21�Frame�– D214n���5�!%��Attribute�>&
§ n E8D5�,�n�D�§ 3�!%-��� B��� ��Domain�
Ø �>�Tuple�– �D21�(C�*,)��53C,)8��>�
§ ���>4n ��>�J>&�3��>�JI #6D215��!%
– ��D21��*m��>�mE8D5�,�Cardinality�
2007��-�!%-IBM��$�-��#������� 28
3.3.0.1 ���� �
�n��� �� ��m����������
��1�������S�����
sno sn sd sa
98001980029800398004
�"
���
���
� �
CSCSCSCS
18201821
2007��-�!%-IBM��$�-��#������� 29
3.3.0.1 ���� �q �%�*3
1) 06��.(*2) 06#,*3) 06+&�*4) 06��14*5) �*�#,*6) �*+&�*7) ��2/",*
Ø �5��7�*3�%���$��'��Relation�
Ø - ���!��%�$������ ���)�$��'�)�
sno sn sd sa
98001980029800398004
�"
���
���
� �
CSCSCSCS
18201821
3.3.0.1 ������
q Relational RulesØRule 1. First Normal Form Rule–Can't have multi-valued fields
ØRule 2. Access Rows by Content Only Rule§ No order to the rows§ No order to the columns
ØRule 3. The Unique Row Rule– Two rows can't be same in all attributes at once.
So that a relation is an unordered SET of tuples–But many products allow this for efficiency of load
2007�-���-IBM����-����������� 31
3.3.0.1 ��� ��
q% ��(���",���$+�� �������������*�
Ø�!��Candidate Key�Ø)��Primary key�–%"& ����#�!�(��!(�"��!�������)����
�)��*��
q�"& ���'�%"����
3. ��Key�
Keys & Superkeys
qKey & SuperkeyØSuperkey– is a set of columns that has the
uniqueness property
Økey– is a minimal superkey:
§ no subset of columns also has uniqueness property
Keys & Superkeysq Def. Table Key
Ø Given a table T, with Head(T)={A1,A2,…,An}. A key for the table T, is a set of attributes, K={Ai1,…,Aik}, with two properties:
1) If u, v are distinct tuples of T, then by designer intention u[K] v[K]; that is ,there will always exist at least one column, Aim, in the set of columns K such that u[Aim] v[Aim]
2) No proper subset H of K has property 1
q Superkey: a set of columns that fulfills property 1 but not necessarily property 2
2007�-���-IBM����-������������ 34
3.3.0.1 �� ���
q���Foreign Key�
���A#���F��B��!����F��A�������� �$��
�#�
–�A���� ����B����� ��
–�A��B�����"���
2007��-'=D-IBM8�B6-����@7,5��%+9 35
3.3.0.1 �9(&;.
���(&�2 ��*- ��@:"3�7��
>? ���$�45!��
‘ 10� ?
/;��19%���142)A�.21#0 �141)A+�20#,8'140�;�.23#<1�139/;=�18%69�138
�;+�23#0 �143
�>�/&� ?��*2�:-�)�*����CE��!F/&?��"2A�����3
<9$>4�?�2�E�2:#
A B C D E F
2007��-�%*-IBM!�(�-����' ������" 36
3.3.0.1 �"��#�
� �‘����
� �� �� � ����
��
��
�
��)+
��‘)(�&
� �� �
����$ ����)+ ���+
2007��-�28-IBM, 6*-���4+�)����- 37
3.3.0.1 �-��/!
�� �� - �;
S1001 ��3 4+� 19S1002 . �� 20S1003 ��% �� 18S1004 $#" 4+� 20
6*1� 6*� �5��
C101 C++ T02C102 OS T01C103 DB T02
�� 6*1� �0
S1001 C101 85
S1001 C102 91
S1001 C103 95
S1003 C101 90
S1002 C101 76
S1003 C102 87
S1004 C101 88
�&
6*
76
�9��9�:(�'�-
2007��-�*1-IBM%�.#-����-$�"����& 38
3.3.0.1 �&��(�
��‘)��,
���
�
�
�
�
�
��
��
��
�
���
��
��
�
����
���
� 202
�2�!��� +/,� �'
2007�-���-IBM����-������������ 39
3.3.0.1 �� ���
�(�*�4-��,�8�4�/�'1�
6��2����� $#!��+�7� 0�
��3���)4����
������������5"����
.��.����.����)4�&�9��
���
�:�6����.�����:%��
�'�6�����'�2���'�1�
2007��-�!%-IBM��$�-��#������� 40
3.3.0.1 ���� �q �%�*3
1) 06��.(*2) 06#,*3) 06+&�*4) 06��14*5) �*�#,*6) �*+&�*7) ��2/",*
Ø �5��7�*3�%���$��'��Relation�
Ø - ���!��%�$������ ���)�$��'�)�
sno sn sd sa
98001980029800398004
�"
���
���
� �
CSCSCSCS
18201821
2007��-�$)-IBM!�(�-���& ������" 41
3.3.0.2 �"�#
q��������� �������
���������
��
��
��
��
�%�����'
��%�*����'
�%�����'
#���
����
2007�-���-IBM����-���������� � 42
3.3.0.2 ����
q���#
�(�����#�.
–��§&$(���#�&*� �%-�*����!��%-����!)�
–�.��§ "'
»"'�,������%-
§�*�
»*� �+$��!
A B C D E1 2 3 4 52 3 5 7 1129 23 19 17 13… … … … …… … … … …… … … … …… … … … …… … … … …
2007��-�*1-IBM'�/%- ���-&�$����( 43
3.3.0.2 �(�)
q� ���cont.������� ��
–����������–��������� ��������
R1 R2 R3 R4 R5
R21 R22
R31
R
��,�#�� .
–����,�����,–!��"��,#�� .��0+ .
2007�-���-IBM����-���������� � 44
3.3.0.2 ����
q �, .$�'�2�@�5���+-��#<���@�%�
1) ���,���– *� ��,8��������5�"?;��+4��,
2) ��,!�6>17– 17�=:�)��6>
3) ��,!�&/:�– 17��(03�&/�9�
2007�-���-IBM����-���������� � 45
3.3.0.2 ����
q !���
Ø !������# +2
Ø ��� �.��$��1����"��+2�����3�� �
1) ������+2§ )���3/���) �$��+2
§ ��* �$��+2',�3���&(����+2
2) -%���3§ ��'0�+2
2007�-���-IBM����-���������� � 46
3.3.0.2 ����
q ��
�����������������
�� �����������������
2007�-���-IBM����-���������� � 47
3.3.0.2 ����
q $�+
Ø 2.��&�+ 416�)� 3��+ �)16��3�
Ø $�+ �7�#.����7�����/0�%$��5�"�!(
1) '��,-+ 162) ����+ �*16
2007- ��-IBM����-������������� 48
3.3.0.2 ����
q ��'��
�'�� �
�'��!��" �
Ø ������&���'��
–#( $–��%�–� ����–#(��–#(��
����
����
�� ��
2007�-���-IBM����-���������� � 49
3.3.0.2 ����
q �;��
Ø 4�;2� %�(:,5$
– �* =�<6.+�;
Ø -/�12��; 7&
�8&#��"<!+�;�9 7&��
0)�;�
�8��7&��"<!+�;�9 7&
��)����
�8'��&<��3�������<
��;� ����
2007�-���-IBM����-���������� � 50
3.3.0.2 ����
n *.SUM�AVG�MAX�MIN�COUNT%��. ���,���+�)#"%�*��
n *%��$,������������'�
����.SUM�AVG�MAX�MIN%��. ��%����&�+
����.COUNT%��. ��%���&0
– -( count(<� !>) � count(*) ��
2007- ��-IBM����-������������� 51
3.3.0.3 ��������
q��� �)�&�
���)�&�
–,�+�����$�*
�(�)�&�
–�� ���*� ���"#�+���'��%.��,�*
Ø#!��)�
–#-�!����*&�
2007 - -IBM - 52
q���� )(
�����������
�����
�������
��������
�������
2007�- ��-IBM����-����������� 53
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
2007�-���-IBM����-������ ����� 54
3.3.1 �����
q������
������ �
–��n�����������n���� ��������������n����
–�����n�������n�����
2007�-���-IBM����-������ ����� 55
3.3.1 �����
q��(�)�Ø��$n�� D1,D2,…, Dn, ���������D1�D2�…�Dn
–��������!�� ��&���#���!��"�����n#" '�
(d1,d2,…,dn)��&di∈Di (i=1,2,…,n)
Ø�� Di�#����ri (i=1,2,…,n)�%����������#�����
r1 � r2 �… � rn
2007�-���-IBM����-������ ����� 56
3.3.1 �����q �R
Øn# �R���n# �&���
Ø�n# �R���"���D1,D2,…, Dn���
%n�"��������n# �&������!n# �R�$�����
R D1�D2�…�Dn
Example of Relationq1#��(��sno���name�,�dept+���� %�)�'�,S�
sno name deptS1 �� !�
2 $. !�
3 &� "
q�2�,���3)���' -���,�!��3)�'�,��0/*�5)
4��S = { (1, ��, !�)�(2, $., !�)�
(3, &�, ") }
Example of Relation
q�+�&(�. �����%�/��
Domain(sno) = {1, 2, 3}
Domain(name) = {��, �', ��}
Domain(dept) = {��, ��}
sno name deptS1 �� ��
2 �' ��
3 �� ��
q��. ���-)"��!,#����� $*W�
S
q��. ���-)"��!,#����� $*W�
1 �� �
1 �# �
1 �� �
2 �� �
2 �# �
2 �� �
3 �� �
3 �# �
3 �� �
1 �� ��
1 �# ��
1 �� ��
2 �� ��
2 �# ��
2 �� ��
3 �� ��
3 �# ��
3 �� ��
W
q��S� "!��������������W�����$
2007�- ��-IBM����-����������� 60
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
2007�-���-IBM����-���������� � 61
3.3.2 �������
qC�5%7F?/G!7�.��H�&�E/G!7�.��H�&@�<���2�5%7*�
4G���K
�5,AI����C�5%7*�8.��H1�����)(��;��5�=�3#�
<��5%7*�4G���K��,�5*�
4G��B0
Ø<�5JB0 6�">�5*�4G��B0�<�D�;��5B0�+�3#�<>E
9��5B0�+ $->��.��H:'
2007��-��"-IBM�� �-���������� 62
3.3.2 �������
q����(���*!����'�(��#�%�����
����(
���*
����'
�(��#�
")�$ �$#�
��&� � #�
���� � ��
")�� �#�
")�� �#�
���#�!�
� ����!�
3.3.2 �������
q $ ���)��"*&������ !�#�����'��
�&��(���
�&��(���
– �� �� ���– �� �)�%+
3.3.2 �����
qDef. 2.6.1 Compatible Tables�����
ØTables R and S are compatible if they have the same headings
Øthat is , if Head(R)=Head(S), with attributes chosen from the same domains and with the same meanings
Compatible Table (example 1)
q Tables R1 and S1 are compatible because:Øwith the same number of columnsØeach pair of columns (one in table R1, and another in
table S1) have:– the same domains (character), and– the same meanings, such as the same name of
columns
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R1 A B Ca1 b1 c1a1 b1 c2a1 b2 c3a3 b2 c3
S1
Compatible Table (example 2)
ØTables R2 isn’t compatible with table S2 because:– The domain of column A in table S2 is integer,
and the domain of column A in table R2 is character, and that–We can’t find a pair of columns (X, A) (X is a
column in table R2, and A is a column in table S2) with the same domain (integer)
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R2 A B C1 b1 c11 b1 c21 b2 c33 b2 c3
S2
Compatible Table (example 3)
ØTables R3 isn’t compatible with table S3 because:–We can’t find a pair of columns (?, D) (? is a
column in table R3, and D is a column in table S3) with the same meanings
– In relational algebra, two columns are said to have the same meanings if they have the same name of column
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R3 A B Da1 b1 c1a1 b1 c2a1 b2 c3a3 b2 c3
S3
Compatible Table (example 4)
ØTables R4 isn’t compatible with table S4 because:
–The number of columns in table R4 isn’t equal to the number of columns in table S4
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R4 A B C Da1 b1 c1 d1a1 b1 c2 d1a1 b2 c3 d1a3 b2 c3 d1
S4
Compatible Table (example 5)
qTables R5 and S5 are compatible because:Øwith the same headings of table–We can move the column B to the left of
the column C in table S5 because No order to the columns
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R5 A C Ba1 c1 b1a1 c2 b1a1 c3 b2a3 c3 b2
S5
Compatible Table (example 5)
c2b1a2
c3b2a1
c1b1a1
CBAR5
A C B
a1 c1 b1
a1 c2 b1
a1 c3 b2
a3 c3 b2
S5
b2
b2
b1
b1
B
c3
c3
c2
c1
C
a3
a1
a1
a1
AS5
3.3.2 �����
q�������
NAME SYMBOL FORM EXAMPLE
UNION���
∪ UNION R ∪ S
INTERSECTION���
∩ INTERSECT R ∩ S
DIFFERENCE���
– MINUS R – S
3.3.2 �������qDef Union, Intersection, DifferenceØLet R and S be two compatible tables, where
Head(R) = Head(S)–R∪S
§ is a table with the same heading as R (or S)§ for each row t in R or in S, t in R∪S
–R∩S§ is a table with the same heading as R (or S)§ for each row t in R, if t appear in S, then t in
R∩S–R – S
§ is a table with the same heading as R (or S)§ for each row t in R, if t don’t appear in S,
then t in R – S
3.3.2 �#�$�'
��� ���
� √ √
� √ √
� � �
q ‘��("�������("� �&�����("����
R∩S = R – (R – S) = S – (S – R)
q�����("����("��%!����
(R – S) ∩ S = (R – S) ∩ R = R – S(R – S) ∩ (S – R) =
2007�-���-IBM����-���������� � 74
3.3.2 �������q�.��R∪S
Ø!�–�+.��� #�&�"� #–"� #��)$"�%�����'� ���%'�)$"/,
Ø��– #�����( )�* #R��* #S-0 0��
cfd
bab
adc
CBAR
af
ga
bd
CBAS
cfda
babg
adcb
CBAR∪S
2007�-���-IBM����-���������� � 75
3.3.2 �������q�#��R – S
Ø��–�!#������������
Ø� –����������� ��R�� ��S"$�$���
cfd
bab
adc
CBAR
af
ga
bd
CBAS
cd
bb
ac
CBAR – S
agbCBAS – R
2007�-���-IBM����-���������� � 76
3.3.2 �������
q ‘������������
A B
A
A ∪ B
A
A – B
B B
B –A
B
2007�-���-IBM����-���������� � 77
3.3.2 �������
q‘�� �������R∪S = S∪R( R∪S )∪T = R∪( S∪T )
q‘�� ��������R – S ≠ S – R( R – S ) – T ≠ R – ( S – T )
2007��- 3:-IBM.�7,-���5-$+���#/ 78
3.3.2 /�0)4*q���Projection���
������������ ����������
Ø6 /R"n���A1,A2,…, An����m���B1,B2,…, Bm�)��8-�4*��
B1,B2,…, Bm ( R )–���Bi∈{ A1,A2,…, An } (i=1,2,…,m)
Ø8-2&
–!��(B1,B2,…, Bm�1�)m� /– /R�)'��1t�B1,B2,…, Bm9m����)��t1,t2,…, tm%�2& /�)���1
2007��-���-IBM����-������� �� 79
3.3.2 �������
q���� �������������
���
cfd
bab
adc
CBAR
ba
BB (R)
cfd
adc
C AC,A (R)
2007 - -IBM - ( 80
3.3.2q�! �� F (R)
������F� �R"�������$��
–�� �� ��������� �R��#��F��$�$�
Ø )F– )
) )
2007�-���-IBM����-���������� � 81
3.3.2 �������
���
cfd
bab
adc
CBAR
cd
bb
ac
CBAcf
ba
ad
CBAcbaCBA
B=‘b’ (R) A>’c’∨C<‘d’ (R) B=‘b’∧C=‘c’ (R)
2007 - -IBM - 0 82
-8��19$���142
&?�+21". 141
&?(�20")5%140
�8�+23"9/�139
-8:�18$36�138
;= ���#�12!��
‘ 2 E
3.3.2
����4�'* ��� >�#��07��7 ,�$<�
#�≤20∧1=‘$� (E)
2007��-�,1-IBM)�/&- ���.(!%��� * 83
3.3.2 *�+#-$
q �&���(�'�$-*���"�.�/����%�3� A ( F ( R ) )
1) !����F R�#$-*�– $�����)1
2) +$-*���� �#�'*�– ��20�� � ��– ��$-*���� /�)1�,�20�� /�)1
p��'��� A F ( R )–�"���#����0(2�������
2007��-���-IBM����-������� �� 84
���
3.3.2 �������
�������� �����
cfd
bab
adc
CBAR
cd
ac
CAA,C ( B=‘b’ (R) )
cd
bb
ac
CBAB=‘b’ (R)
2007 - -IBM - 0 85
3.3.2
����5�(+ ��� ?�$��18��8 -�%=��3"���
3",�� ( $�≤20∧2=‘%’ (E))
.9��19%�� 142
'@�,21#/ 141
'@)�20#*6&140
�9�,23#:0�139
.9;�18%47�138
<>!���$�23"��
‘ E
����
;�47�
��3"
2 T
2007�-���-IBM����-���������� � 86
3.3.2 �������q&/2$��5���
A_set ( B_set ( R ) ) ≠ B_set ( A_set ( R ) )
q,32$�5���
F1 ( F2 ( R ) ) = F2 ( F1 ( R ) ) = F1∧F2 ( R ) )
q&/2$�,32$��)���
A ( F ( R ) ) ≠ F ( A ( R ) )Ø!�1���"#-�� ����4+���"����.1*6�+����06���" �%1���"�
Ø-���(�' 6*1�+��
2007�- ��-IBM����-����������� 87
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
��
2007�-���-IBM����-������ ����� 88
�� � ��
��� R ∪ S √ √
��� R – S � �
���� B1, B2, …, Bm(R) � �������
�������� F(R) √
2007"$-+;C-IBM7�@4-����>6/2��).8 89
3.3.2 �8*90=1q��������R�S
� ������
Ø?�8R�S��-n�m�!'���R(A1,A2,…, An) � S(B1,B2,…, Bm)–���05� 3T = R�S-(n+m)�!'���T(A1,A2,…, An, B1,B2,…, Bm)
Ø<�:(a1,a2,…, an)∈R��:(b1,b2,…, bm)∈S�����#(%�0,�:&!A���805� 3���
(a1,a2,…, an, b1,b2,…, bm)∈TØ<�8R�S��-p�q��:�B���05� 3� �-(p�q)��:
2007- ��-IBM����-������������� 90
3.3.2 ����������
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
R
B C Db1 c1 d1b1 c1 d3b2 c2 d2b1 c2 d4
S
R.A R.B R.C S.B S.C S.Da1 b1 c1 b1 c1 d1a1 b1 c1 b1 c1 d3a1 b1 c1 b2 c2 d2a1 b1 c1 b1 c2 d4a1 b2 c3 b1 c1 d1a1 b2 c3 b1 c1 d3a1 b2 c3 b2 c2 d2a1 b2 c3 b1 c2 d4a2 b1 c2 b1 c1 d1a2 b1 c2 b1 c1 d3a2 b1 c2 b2 c2 d2a2 b1 c2 b1 c2 d4
R � S
2007�-���-IBM����-���������� � 91
3.3.2 �������
q�����&�������
ØR�S = S�RØ(R�S)�T = R�(S�T)
q� ��R�S%�#���� ��$�!#� ��%�%�"�����
���
2007�-���-IBM����-���������� � 92
3.3.2 �������q�&"��1�#2�(��4
��+,�&�"�� ��!
1).3��– �'0��.3��&R’�/���4��!%�R∪R’
2).3�– �-��.3��&R’��+��*�4� ��/��4��!%�R – R’
3))��4– �-)��.3��&R’��)��$��'.3��&R’’�/"���)��4��!%�(R – R’)∪R’’
2007�-���-IBM����-���������� � 93
3.3.2 �������4) �3�C
Ø ���,�1> + )5– �3-2 ($/A�) �3'72#�0�9��– �3-3 (��(��:B1>) ?'7��820&�2#:B
– �3-4 (�;(��:B1>) ?��820& =%2,�MA�2+�2#:B
– �3-5 (:B1>+$/A�) �'7��820&�2#�0�
Ø ���,
– -6 ��������,��*4��,�!�<@.���,"�%��3�C
2007��-��-IBM����-������� ���� 94
Example: The CAP Database
cid cname city discnt
c001 TipTop Duluth 10.00
c002 Basics Dallas 12.00
c003 Allied Dallas 8.00
c004 ACME Duluth 8.00
c006 ACME Kyoto 0.00
CUSTOMERS
2007��-��-IBM����-������� ���� 95
Example: The CAP Database
aid aname city percent
a01 Smith New York 6
a02 Jones Newark 6
a03 Brown Tokyo 7
a04 Gray New York 6
a05 Otasi Duluth 5
a06 Smith Dallas 5
AGENTS
2007��-��-IBM����-������� ���� 96
Example: The CAP Database
pid pname city quantity price
P01 comb Dallas 111400 0.50
p02 brush Newark 203000 0.50
p03 razor Duluth 150600 1.00
p04 pen Duluth 125300 1.00
p05 pencil Dallas 221400 1.00
p06 folder Dallas 123100 2.00
p07 case Newark 100500 1.00
PRODUCTS
2007��-��-IBM����-������� ���� 97
Example: The CAP Database
ordno month cid aid pid qty dollars
1011 jan c001 a01 p01 1000 450.00
1012 jan c001 a01 p01 1000 450.00
1019 feb c001 a02 p02 400 180.00
1017 feb c001 a06 p03 600 540.00
1018 feb c001 a03 p04 600 540.00
1023 mar c001 a04 p05 500 450.00
… … … … … … …
ORDERS
2007��-��-IBM����-������� ���� 98
Example 1
q������(CUSTOMERS, ��C)��
cid cname city discnt
c001 TipTop Duluth 10.00
c002 Basics Dallas 12.00
c003 Allied Dallas 8.00
c004 ACME Duluth 8.00
c006 ACME Kyoto 0.00
C
ACME
Allied
Basics
TipTop
cname
CN
–�����CN���CN := cname(C)
2007��-� $-IBM��#�-���!�������� 99
Example 1 (cont.)
q �������������Duluth’��Dallas’��
cid cname city discnt
c001 TipTop Duluth 10.00
c002 Basics Dallas 12.00
c003 Allied Dallas 8.00
c004 ACME Duluth 8.00
c006 ACME Kyoto 0.00
C
city
Duluth
Dallas
Kyoto
city(C)
q�"��%�(CUSTOMERS, ���C)� �����
2007��-��"-IBM��!�-� � �������� 100
Example 1 (cont.)
A B Ca1 b1 c1a1 b1 c3a2 b2 c2a1 b2 c4
CAa1a2
A(C)B Ab1 a1b2 a2b2 a1
B,A (C)B Cb1 c1b1 c3b2 c2b2 c4
B,C (C)
$��%�#�������a1’
$��%�#�������b1, a1�
2007��-���-IBM����-������������� 101
Example 2
q�� �����(Kyoto)�
cid cname city discntc001 TipTop Duluth 10.00c002 Basics Dallas 12.00c003 Allied Dallas 8.00c004 ACME Duluth 8.00c006 ACME Kyoto 0.00
CUSTOMERS
cid cname city discntc006 ACME Kyoto 0.00
T := city = ‘Kyoto’ ( CUSTOMERS )
2007 �-��$-IBM�� �-������������ 102
Example 2 (cont.)q�����"��(Dallas)���(price)!#$0.50��
T := city = ‘Dallas’ ∧ price > 0.50 (Products)
pid pname city quantity price
P01 comb Dallas 111400 0.50
p02 brush Newark 203000 0.50
p03 razor Duluth 150600 1.00
p04 pen Duluth 125300 1.00
p05 pencil Dallas 221400 1.00
p06 folder Dallas 123100 2.00
p07 case Newark 100500 1.00
2007�-���-IBM����-������ ����� 103
Example 3 ����
q�����������
CUSTOMERS à CAGENTS à APRODUCTS à PORDERS à O
2007��-�'+-IBM%�*#-���($�!����& 104
Example 3 (cont.)
q�����������(customers)����(agents)�������(cname)�������(aname)� ���������(city)
C.cname, C.city, A.aname ( C.city = A.city (C x A))
q�)����(discnt)��10% -�������,(percent)��6% �� ���� ���"
city ( discnt < 10 (C))� city ( percent < 6 (A))
2007�-���-IBM����-����������� � 105
Example 3 (cont.)
q�! ���Allied’�������(orders)�����"������������� (pid)��$(month)#����(qty)
O.pid,O.month,O.qty( C.cid=O.cid ∧ C.cname=‘Allied’(C�O))
O.pid,O.month,O.qty( C.cid=O.cid( cid( C.cname=‘Allied’(C))�O ))
2007�-���-IBM����-������ ����� 106
Example 3 (cont.)
q��������������������
������� (ordno)
ordno (
C.city=A.city ∧ P.city=A.city ∧ C.cid=O.cid ∧ A.aid=O.aid ∧ P.pid = O.pid (
cid,city(C) � aid,city(A)� pid,city(P) � O
)
)
2007� -)=D-IBM8�B6-���@7-5��',9 107
Example 3 (cont.)
q ��������, �� ����(discnt)������(cid)
1) 1A%+F�4;���:/.#�9R1R1 := cid (C)
2) 1A(&�E*�4F���(& ���0�F�4(&�$>�����F�X�<X4(&G�!�F�4(&�4;��1A:/.#�9R2� S := C, ��
R2 := C.cid ( C.discnt < S.discnt (C x S))
3) �3�2�difference�C7?"�*�(&F�4;�
T := R1 – R2
2007��-�&*-IBM")�-��� '!�� ���# 108
Example 3 (cont.)
q(��������������� �, ��������(discnt)� ���(cid) (�S := C)
cid (C) – C.cid ( C.discnt < S.discnt (C x S))
q�%-
�(�������,��$�
�(���+��(�)�,��$��(���� ��(�)�,��$��(�������,���(cname)
2007�- ��-IBM����-����������� 109
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
2007� -���-IBM���-������������ 110
3.3.4 ����������
q��� ����
���intersection���
���division������join���
§����natural join���
2007��-���-IBM����-���������� 111
3.3.4 ������ ���
q‘�����R∩SØ� –����
Ø�–���������������R�����S��������
cfd
bab
adc
CBAR
af
ga
bd
CBAS
fadCBA
R∩S
2007� -���-IBM���-������������ 112
3.3.4 ����������
q ‘��������������
A B
B
A � B A ∩ B A – B
2007��-$6;-IBM3�90-���82*/��")4 113
3.3.4 �4�%�.!�:2
q ‘�����������R ∩ S = S ∩ R(R ∩ S) ∩ T = R ∩ (S ∩ T)
q ‘�:2��&���(:2���7��-���:2+�,
R ∩ S = R – (R – S) = S – (S – R)
q'���:2����:2.�51 �#�
(R – S) ∩ S = (R – S) ∩ R = R – S(R – S) ∩ (S – R) =
2007��-�$+-IBM!�)�-����( ������" 114
3.3.4 "������* ����������
A B Ca1 b1 c1a1 b2 c3a2 b1 c2
RA B Ca1 b1 c1a1 b1 c2a1 b2 c3a3 b2 c3
S
c2b1a1c2b1a2
c3b2a3
c3b2a1c1b1a1CBA
R � S
c3b2a1c1b1a1CBA
R ∩ S
c2b1a2CBA
R – S
c3b2a3c2b1a1CBA
S – R�'&%���# �
��"R���,&%���# ���"S�
2007� -���-IBM���-������������ 115
3.3.4 ����������
FN LNSusan Yao
Amy Ford
Jimmy Wang
Ramesh Shah
John Ford
STUDENT(S)
FN LNRamesh Shah
Francis Johnson
Susan Yao
John Smith
INSTRUCTOR(I)
WangJimmy
ShahRamesh
FordJohn
FordAmy
JohnsonFrancisSmithJohn
YaoSusanLNFN
S � IFN LN
Susan Yao
Ramesh Shah
S ∩ I
FN LNAmy Ford
Jimmy Wang
John Ford
S – I
FN LNFrancis Johnson
John Smith
I – S
2007��-���-IBM����-���������� 116
3.3.4 ������ ���
q�#�� R S� R�S� ��(�����! )��
Head(R) � Head(S)Ø#����Head(S) Head(R)–�"����
§Head(R) = { A1,A2,…,An, B1,B2,…,Bm }§Head(S) = { B1,B2,…,Bm }
–�$�§S ������ �§R ������� �§�� ������
2007��-�$)-IBM '�-����%�������! 117
*(� (cont.)
n x H
=
n& x �#�! T ����" ( x ∈ T )����! S �����" y ���
( x, y ) ∈ R
Ø H1 ) (2
� HA
§ , ) , , (
�
§ H( H
2019/9/25 118
Result of T=R�S1. Assume a row x is in T, then:
for each row y in S {
we can find a row z in R, and {
x(Ai) = z(Ai) for 1 <= i <= ny(Bj) = z(Bj) for 1 <= j <= m
}
}
2. T contains the largest possible set of rows x
2007-���-IBM����-����������� � 119
������
A B Ca1 b1 c1a2 b1 c1a1 b2 c1a1 b2 c2a2 b1 c2a1 b2 c3a1 b2 c4a1 b1 c5
R C
c1
S A Ba1 b1a2 b1a1 b2
T
R S
Cc1c2
S A Ba1 b2a2 b1
T
R S
C
c2
S A Ba1 b2a2 b1
TR S
2007-���-IBM����-����������� � 120
������ (cont.)
A B Ca1 b1 c1a2 b1 c1a1 b2 c1a1 b2 c2a2 b1 c2a1 b2 c3a1 b2 c4a1 b1 c5a2 b2 c2
R C
c1
S A Ba1 b1a2 b1a1 b2
T
R S
C
c2
S A Ba1 b2a2 b1a2 b2
T
R S
Cc1c2
S A Ba1 b2a2 b1
T
R S
2007-���-IBM����-����������� � 121
������ (cont.)
A B Ca1 b1 c1a2 b1 c1a1 b2 c1a1 b2 c2a2 b1 c2a1 b2 c3a1 b2 c4a1 b1 c5
RCc1c2c3c4
SA B
a1 b2
T
R S
Cc1c2c3c4c5
SA B
T
R S
2007-���-IBM����-����������� � 122
������ (cont.)
A B Ca1 b1 c1a2 b1 c1a1 b2 c1a1 b2 c2a2 b1 c2a1 b2 c3a1 b2 c4a1 b1 c5
RB C
b1 c1
SAa1a2
T
R S
B Cb1 c1b2 c1
SA
a1
T
R S
2007 - -IBM - - 123
3 7
A B C D1 2 3 47 8 5 67 8 3 41 2 5 61 2 4 2
R C D3 45 6
S A B1 27 8
TR S
C D
3 4
S A B1 27 8
TR S
C D3 45 64 2
S A B1 2
TR S
2007 - -IBM -- 124
3 8 C
sno cnos1 c1s1 c2s2 c1s2 c2s2 c3s3 c2
SC
cnoc1c2c3
Csno
s2
T
SC C
c1 c2c2
2007��-&8>-IBM2�;0-����:1*/�%)3 125
���
sno cno Gs1 c1 80s1 c2 85s2 c1 90s2 c2 70s2 c3 85s3 c2 85
SC cnoc1c2c3
C
�!7?��<;�3SC�����"#6 G�-�$9 SC C�=��
�5+�3.�3, '���
�5+�3�.�4�(� �
2007��-���-IBM����-���������� 126
3.3.4 ������ ���
q‘������� �����
�� R = T S�����T = R SS = R T
�� T = R S�����T S R
2007��-�� -IBM����-�� ���� ���� 127
���!����������
T S =
A B C Da1 b1 c1 d1a1 b1 c2 d2a1 b1 c3 d3a2 b2 c1 d1a2 b2 c2 d2a2 b2 c3 d3
R
A Ba1 b1a2 b2
T
C Dc1 d1c2 d2c3 d3
S
T = R S S = R T
2007��-�� -IBM����-�� ���� ���� 128
���!����������
A B C Da1 b1 c1 d1a1 b1 c2 d2a1 b1 c3 d3a1 b2 c1 d1a2 b2 c1 d1a2 b2 c2 d2a2 b2 c3 d3a2 b1 c2 d2
R
A Ba1 b1a2 b2
T = R S
C Dc1 d1c2 d2c3 d3
S
d3d2d1d3
d2
d1D
c3b2a2c2b2a2c1b2a2c3b1a1
c2b1a1
c1b1a1CBA
R’ := T S
2007��-���-IBM����-���������� 129
3.3.4 ������ ���
q‘�����������
IFHead(R) = { A1 . . . An B1 . . . Bm }Head(S) = { B1 . . . Bm }
THENR�S = A1...An(R) - A1...An(( A1...An(R)XS) - R)
2007- ��-IBM����-������������� 130
‘���������1) Tmax := A1...An ( R )
// Tmax�3������+2��
2) Rmax := Tmax X S// Rmax*�#R�"��#
3) T1 := Rmax – R
4) T2 := A1...An ( T1 )// T2��#Tmax0��1�, ���&���%+2����)�#T20��' +2q�/��-�#S0.' +2s��(+2q�s!���+2(q,s)�-�#R0�$
5) R � S := Tmax – T2
2007��-�,2-IBM(�/%-���.'�$����) 131
!��"�SC�#�*� sno�&��3�1'�+��)��*#-
!��"�SC�#�*� sno�&��3�1'�+��)��*#-
!��"�SC�#�*� sno�&��3�1'�+��)��*#-
��‘3�1'#��0%
sno cnos1 c1s1 c2s2 c1s2 c2s2 c3s3 c2
SCcnoc1c2c3
C
s2
sno+��)T
s3
s2
s1snoTmax
c3s1
c1s3
c3s3c2s3
c3s2c2s2c1s2
c2s1c1s1cnosno
SCmax
s3
s1
snosno(SCmax - SC)
2007� -���-IBM����-���������� 132
��� ‘���������
sno cno Gs1 c1 80s1 c2 85s2 c1 90s2 c2 70s2 c3 85s3 c2 85
SC
cnoc1c2c3
C
858570908580G
s3s2s2s2s1s1snoTmax
2007��-�-1-IBM*�/(-���.)"&���!+ 133
3.3.4 �+ �%� 0)
q%���,+T�7�,T4�,R�S��,&�ØHead(T) = Head(R) all Head(S)–��-�(�8��* '/�6���,9�0�* '/�.�
Ø�,R�S9 �#"1�5;r�s�$�5;r�5;s8��:��)�F�!��23r�s�������,T9�1�5;���(r,s) ∈ T
q,� (join) 0)�R S
Ø�'θ�,�0)�����+ R ��+ S $�,�#� F ������+
F
2007��-���-IBM����-���������� 134
3.3.4 ������ ���q��%�F��2� �R S
��%��
–�5�§ i!�'R5�")�j!�'S5�")»*�+,")1�'5�&4�$")�
§ !��/#�
»�.���(.��»3��
Ø-�����%����/#� ∧� ∨���� 0%�
F
2007 - -IBM - - 135
3 9
A B C D1 2 3 43 2 1 87 3 2 1
E F1 87 95 2
A B C D E F1 2 3 4 1 83 2 1 8 1 83 2 1 8 7 93 2 1 8 5 2
R
S
R S D>E
A B C D E F7 3 2 1 1 8
R S D=E
2007��-�&+-IBM#�) -���'"������$ 136
3.3.4 $�����*"
q��������
q%�*"�!����*"� $
–(T1 = R x S�T2 = R S���
Head (T2) = Head (T1)�� T2 T1
F
F
R S � F ( R�S )
2007��-���-IBM����-���������� 137
3.3.4 ������ ���
q!��� (natural join) ���
��������� ���������
������
���
–��R���S����
Head(R) Head(S)
R S
2007��-���-IBM����-���������� 138
3.3.4 ������ ���
q3��� (natural join) .#�
Ø.#��
–���'�")��& Head(R) Head(S)–���'2�-4�
§��'R��'S2����* -4 r � s� �-4 r �-4 s /$��%�")!��0(����+,r�s�������'2�* -4
§%�")!��0/���'21��*�
R S
2007� -���-IBM���-������������ 139
3.3.4 ����������
q�� ��������
Ø����RS�R���A1, A2, …, An�S���B1, B2, …, Bm, ���������A1, A2, …, Aj� B1, B2, …, Bj
��R�S��� ���������������
R S = A1,A2, …, An, Bj+1, …, Bm (A1=B1∧A2=B2∧…∧Aj=Bj (R�S) )
2007 -- -IBM - 140
3 10
A B C D1 2 3 41 5 8 32 4 2 61 1 4 7
D E5 16 47 36 8
A B C D E2 4 2 6 42 4 2 6 81 1 4 7 3
R S R S
2007��-���-IBM����-�������� �� 141
�����������
A B C
1 2 3
2 4 6
3 1 4
B C D2 3 42 3 51 4 23 5 1
A B C D
1 2 3 4
1 2 3 5
3 1 4 2
R S R S
2007��-�(.-IBM$�*"-���)#�!����% 142
� ���%,#
q���� R S
q� ��'�,#
�'�� outer join �
R S
��'�� left outer join �
R S
Ø �'�� right outer join �
R S
��-+&��/��� �%R�/�S
2007��-�� -IBM���-��� ���� ���� 143
����������������
A Ba1 b1a2 b2a3 b5
R B Cb1 c1b2 c2b3 c3b4 c4
SA B Ca1 b1 c1a2 b2 c2
R S
A B Ca1 b1 c1a2 b2 c2a3 b5 null
null b3 c3null b4 c4
R S
A B C
a1 b1 c1
a2 b2 c2
a3 b5 null
R SA B Ca1 b1 c1a2 b2 c2
null b3 c3null b4 c4
R S
2007�- ��-IBM����-������������� 144
�����
q ���
Ø"(��
q ��'��
���#�
�%��#�
–� �� ––�! � $ ������
�%��#�
–�–– -�� �&��� ����
F
2007�- ��-IBM����-����������� 145
3.3 �������—����
3.3.0 ���
3.3.1 �����3.3.2 �������3.3.3 ��������3.3.4 ���������
3.3.5 �����
2007��-���-IBM����-�������� �� 146
3.3.5 �����
q #���
1) $�0!�����*9�(-�
2) $0)�
3) /6 )��!��7������$��:�+���
– 5�:��9.1&3�",�*?
– 8,�*4'%����2��*�?
2007��-���-IBM����-�������� �� 147
3.3.5 �����
q �����cont.�4) �����– ���& 3) ��� �������
5) "'��#– ���& 2) ��� (� ��)��"'��#
6) ���%– ���& 1) ��� $��!�(
2007��-���-IBM����-�������� �� 148
3.3.5 �����
q� ������
�����S(sno�sn�sd�sa)
�����C(cno�cn�pno)
�����SC(sno�cno�G)
2007��-�),-IBM&�+#-����*%�"����' 149
3.3.5 '������ S ( sno�sn�sd�sa )�� C ( cno�cn�pno )��SC ( sno�cno�g )
��3.11��(� ����
S
��3.12��(� �.��$�20�!� ��
sn ( sa≥20 (S) )
��3.13��(-+ �C2!+#!+#
cno ( pno=‘C2’ (C) )
2007��-�+/-IBM'�.%- ���,& $����( 150
3.3.5 �(���
�3.14�!).%��C���*�A#���"��
sn ( cno=‘C’ ∧ g=‘A’ ( S ∞ SC ) )
�3.15�!)s1�-#��.%���0.�
cn, pno ( sno=‘S1’ ( C ∞ SC ) )
�3.16�!)�1�23�#�"�-#.%�
cn ( sa=23 ( S ∞ SC ∞ C ) )
�� S ( sno�sn�sd�sa )�� C ( cno�cn�pno )��SC ( sno�cno�g )
2007� -#9B-IBM4�>2-���<3&1��"%5 151
3.3.5 �5�$��
��3.17�,6:��=�S5!�=0�C>0�/��
��(�
1) 8)�7D;.?0' ��=�S5!�=@0*�C>2
2) S5�=��>2�
3) ���S5�=@0>2+�.?;-0�/�7�
sn ( S ∞ sno ( SC ∞ cno ( sno=‘S5’ ( SC ) ) ) )
�/ S ( sno�sn�sd�sa )>2 C ( cno�cn�pno )A>SC ( sno�cno�g )
2007��-�'--IBM$�*!-����)#� ����% 152
3.3.5 �%����
cno ( sno=‘S5’ ( SC ) )
S5 ,�+�*!�*!&�
sn ( S ∞ sno ( SC∞ cno ( sno=‘S5’ ( SC ) ) ) )
�" (����������
,�+��.*!������
sno ( SC ∞ cno ( sno=‘S5’ ( SC ) ) )
2007 !-%;C-IBM6�?4-����=5)3��#(7 153
3.3.5 �7 &��
��3.18�/8�>S4"�>2"'?42�1����+�
1) :,�9D<0@2*���>S4"�>A2"'?4
2) S4�>��?4�3) ��.$�9?4�S4"�>A2?4�-��>�2"'?42�1�9�
sn ( S ∞ ( sno,cno(SC) cno ( sno=‘S4’(SC) ) ) )
�1 S ( sno�sn�sd�sa )?4 C ( cno�cn�pno )B?SC ( sno�cno�g )
2007��-��-IBM����-������� ���� 154
��3.18��������
1) sn ( S ∞ sno ( SC ∞ cno ( sno=‘S4’ (SC) ) ) )
2) sn ( S ∞ ( SC cno ( sno=‘S4’ (SC) ) ) )
3) sn ( S ∞ ( sno,cno (SC) sno=‘S4’ (SC) ) )
4) sn ( S ∞ ( SC sno=‘S4’ (SC) ) )
5) sn ( ( S ∞ SC ) cno ( sno=‘S4’ (SC) ) )
6) sn,cno ( S ∞ SC ) cno ( sno=‘S4’ (SC) )
2007��-�*0-IBM%�-#-����+$�!����& 155
3.3.5 �&���
�3.19��',��-# ���
sno,cno ( SC ) cno ( C )
��)2��'����1/. -# ( ��"
�3.20��'�,��-# ���
sno ( S ) – sno ( SC )
�� S ( sno�sn�sd�sa )�� C ( cno�cn�pno )��SC ( sno�cno�g )
2007��-�&+-IBM!�(�-�� �' ������" 156
��%-�
1) �#��' �"��,*�)�(��(�
�(�
2) �#��*���������,*�)�(�
�$
2007��-���-IBM����-�������� �� 157
3.3.5 �������3.21�% C'&�#�!��
C∪{ (C13�ML�C3) }
��3.22�"��S17"�$��", �%S�SC'���
S � ( s#=‘s17’ (S) ) SC � ( s#=‘s17’ (SC) )
��3.23�� S'"�S6����22�
��3.24�� S'���&�1�
S�sno�sn�sd�sa�1�
2007�- ��-IBM����-������������� 158
������ -�
q����
Ø �$�
–���������� ��%Ø��$�
–������#'���Ø��$�
–����)����"���
q�����!�&
q(�
��
qhttp://ws2.nju.edu.cn/kgwiki/q�2����q����2019�929�
2007-���-IBM����-����������� � 159