Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
599 views
in Technique[技术] by (71.8m points)

prolog to SQL converter

Without thinking to much, it seems to me that a large set of Prolog's functionality could be implemented as relational calculus (a.k.a. SQL).

Has anyone heard of any tools to automatically convert Prolog to SQL?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yes, of course.

A premise for skeptics: any semi-decent book on database theory mentions Datalog (which is Prolog-like) and theorems which demonstrate that is possible to translate it to/from Relational Algebra (RA) (under specific restrictions).

SQL is not faithful to RA or relational calculi, but is enough to support Prolog:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...