Tải bản đầy đủ (.pptx) (21 trang)

NGÔN NGỮ TRUY VẤN TRONG BỐI CẢNH THÔNG TIN KHÔNG ĐẦY ĐỦ

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (853.06 KB, 21 trang )

NGÔN NGỮ TRUY VẤN TRONG BỐI
CẢNH THÔNG TIN KHÔNG ĐẦY
ĐỦ
***
A Query Language For Incomplete Information
GVHD: PGS.TS Đỗ Phúc
SVTH: Lê Văn Đào
MSSV: CH1101071

Tháng 8/2012
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN
KHOA CÔNG NGHỆ THÔNG TIN
2
Đặt vấn đề
1
Ngôn ngữ I-SQL
2
World-set Algebra
3
Các luật tương đương
4
Mục lục:
Tài liệu tham khảo
6
Kết luận
5
3
Đặt vấn đề
4
Các khái niệm cơ bản
W4


W2
W6
W3
TID S N M
t1 785 Smith 2
t2 186 Brown 4
TID S N M
t1 185 Smith 1
t2 186 Brown 2
TID S N M
t1 185 Smith 1
t2 186 Brown 3
TID S N M
t1 185 Smith 1
t2 186 Brown 4
W5
W1
TID S N M
t1 185 Smith 2
t2 186 Brown 1
TID S N M
t1 185 Smith 1
t2 186 Brown 1
5
NGÔN NGỮ I-SQL
Generic
1
Expressive
2
Conservative

3
Efficient evaluation
4
6
NGÔN NGỮ I-SQL (tt)
1
Standard SQL
constructs
Select * from
Flights where
Arr = ‘BCN’;
2
Merging worlds

possible

certain

group worlds by
7
Ví dụ
W2
W1
CID Skill
ACME Web
CID Skill
HAL Java
select possible CID
from W
where Skill = ‘Web’;

Result
CID
ACME
select certain CID
from W
where Skill = ‘Web’;
CID
8
NGÔN NGỮ I-SQL (tt)
1
Standard SQL
constructs
Select * from
Flights where
Arr = ‘BCN’;
2
Merging worlds

possible

certain

group worlds by
9
Ví dụ
W2
W1
CID EID
ACME e1
CID EID

ACME e2
select certain CID, Skill
from W, Emp_Skill
where W.EID = Emp_Skill.EID
group worlds by (select CID from W)
Result
W4
W3
W5
CID EID
HAL e3
HAL e4
CID EID
HAL e3
HAL e5
CID EID
HAL e4
HAL e5
Emp_Skills
EID Skill
e1 Web
e2 Web
e3 Java
e3 Web
e4 SQL
e5 Java
Result
CID Skill
ACME Web
CID Skill

HAL Java
10
NGÔN NGỮ I-SQL (tt)
1
Standard SQL
constructs
Select * from
Flights where
Arr = ‘BCN’;
2
Merging worlds

possible

certain

group worlds by
3
Splitting up
worlds

choice of

repair by key
Company_Emp
11
Ví dụ
CID EID
ACME e1
ACME e2

HAL e3
HAL e4
HAL e5
select *
from Company_Emp
choice of CID
Result
Result
CID EID
ACME e1
ACME e2
CID EID
HAL e3
HAL e4
HAL e5
12
NGÔN NGỮ I-SQL (tt)
1
Standard SQL
constructs
Select * from
Flights where
Arr = ‘BCN’;
2
Merging worlds

possible

certain


group worlds by
3
Splitting up
worlds

choice of

repair by key
Tháng 3/2010 13
Ví dụ
13
W4
W2
W6
W3
TID S N M
t1 785 Smith 2
t2 186 Brown 4
TID S N M
t1 185 Smith 1
t2 186 Brown 2
TID S N M
t1 185 Smith 1
t2 186 Brown 3
TID S N M
t1 185 Smith 1
t2 186 Brown 4
W5
W1
TID S N M

t1 185 Smith 2
t2 186 Brown 1
TID S N M
t1 185 Smith 1
t2 186 Brown 1
Select * from Census repair by key SSN
14
NGÔN NGỮ I-SQL (tt)
1
Standard SQL
constructs
Select * from
Flights where
Arr = ‘BCN’;
2
Merging worlds

possible

certain

group worlds by
3
Splitting up
worlds

choice of

repair by key
4

Data
Manipulation

insert

update

delete
Select R1.CID, R1.EID
from Company_Emp R1, (select * from U choice of EID)
R2
where R1.CID = R2.CID and R1.EID != R2.EID
15
Ví dụ
Company_Emp
CID EID
ACME e1
ACME e2
HAL e3
HAL e4
HAL e5
Emp_Skills
EID Skill
e1 Web
e2 Web
e3 Java
e3 Web
e4 SQL
e5 Java
U1

U2
CID EID
ACME e1
ACME e2
CID EID
HAL e3
HAL e4
HAL e5
V1.2
V1.1
CID EID
ACME e1
CID EID
ACME e2
V2.1
V2.3
V2.2
CID EID
HAL e3
HAL e4
CID EID
HAL e3
HAL e5
CID EID
HAL e4
HAL e5
W2.*
W1.*
CID Skill
ACME Web

CID Skill
HAL Java
Result
CID
ACME
select certain CID, Skill
from V, Emp_Skill
where V.EID = Emp_Skill.EID
group worlds by (select CID from V)
select *
from Company_Emp
choice of CID
select possible CID
from W
where Skill = ‘Web’;
16
select [possible | certain] sellist
from qlist
where cond
[group by attrlist]
[choice of attrlist]
[repair by key attrlist]
[group worlds by sqlquery];
insert into relname values values;
delete from relname [where cond];
update relname set settings [where cond];
NGÔN NGỮ I-SQL (tt)
17
WORLD-SET ALGEBRA
possible:

certain:
choice of:
possible-group-worlds-by:
certain-group-worlds-by:
select possible CID
from W
where Skill = ‘Web’;
select certain CID
from W
where Skill = ‘Web’;
select *
From Company_Emp
choice of CID
select certain CID, Skill
from V, Emp_Skill
Where V.EID = Emp_Skill.EID
group worlds by (select CID from V)
18
Luật giao hoán
19
Luật rút gọn
20
Kết luận

Đưa ra ngôn ngữ I-SQL tương tự như SQL để
truy vấn trong bối cảnh thông tin không đầy đủ

Ngôn ngữ I-SQL phải thoả 4 tính chất đã nêu

Đưa ra world-set algebra của I-SQL tương tự

như relational algebra của SQL
21
Tài liệu tham khảo

[1] Bài giảng hệ cơ sở dữ liệu nâng cao của PGS.TS Đỗ Phúc.

[2] Christian Fechner and Mohamed Yahya. Effective Representation and Processing
of Incomplete Information Copyright © July 23, 2009.

[3] Robert J. Aumann†and Aviad Heifetz. Incomplete Information Copyright © July
3, 2001.

[4] Esteban ZIMANYI. Incomplete and Uncertain Information in Relational
Databases.

[5] Gosta Grahne, Department of Computer Science, Concordia University,
Montreal, Canada. Incomplete Information

×