Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Prolog & Database

HI!
How can i link database (such as MS access) to prolog?
«1

Comments

  • AlexandrescuAlexandrescu Posts: 66Member
    [b][red]This message was edited by Alexandrescu at 2005-5-4 15:2:43[/red][/b][hr]
    : HI!
    : How can i link database (such as MS access) to prolog?
    :
    Hum! Tricky, tricky business - because Prolog is itself a database system (intelligent database) therefore it's developers didn't think at the kind of use you are looking for. Besides, back in 1975, when Prolog was first developed, RDBs, like Access, were not what they are today; RDBs were at their first steps too.

    An even worse news is that Prolog systems *usually* can recognise only C functions (OBJs). That feature might make your job a nightmare - to use embeded SQL into C functions that you link with Prolog; real nightmare - and it is the most elegant solution in this scenario! [ real bad ideea! ]

    I think you should actively browse the Internet in order to download a Prolog system that recognises VB - Obviously a better choice. [ However, you will succeed using this approach only if you're lucky ]

    IDEEAS:
    1. You can emulate Prolog within MS Access. I did that already - as an exercise - it worked pretty fast and it was a very uniform technical solution - should I mention that there is some VB in Access ? OK, I won't. [ However this approach looks rather like an exercise! ]

    2. Since you can not escape VB, then develop a Prolog system using VB; in this case linking Prolog to Access will raise no serious problems. [ And I think that it's this approach which should be taken. ]

    Do you want some more? Shoot!


  • AlexandrescuAlexandrescu Posts: 66Member
    [b][red]This message was edited by Alexandrescu at 2005-9-9 12:45:58[/red][/b][hr]
    : HI!
    : How can i link database (such as MS access) to prolog?
    :
    You can also try visual Prolog 6.2 - COMERCIAL EDITION. Too bad that it is not free! [the PERSONAL one is free, but doesn't provide the required features; I just downloaded it some 2 hours ago.]

    If money is not an issue - the COMERCIAL EDITION costs 299$ - then you may consider to follow the hiperlink:

    https://secure.pdc.dk/viporder/order.htm

    P.S. I'd like to know what are you going to do in order to solve your problem. Please let me know.


  • JonathanJonathan Posts: 2,914Member
    : An even worse news is that Prolog systems *usually* can recognise only
    : C functions (OBJs). That feature might make your job a nightmare - to
    : use embeded SQL into C functions that you link with Prolog; real
    : nightmare - and it is the most elegant solution in this scenario! [
    : real bad ideea! ]
    :
    If you can link Prolog against a C library of functions, then how is that bad news? There are C bindings for pretty much every database out there. If there is a way of calling C functions from a Prolog program, then I'd guess there will also be a way of passing parameters, so you can have the query itself written in your Prolog code (Prolog has some concept of strings, I believe?) You can probably write some wrapper functions around the database binding in C to get something that feels nicer to use in Prolog.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • AlexandrescuAlexandrescu Posts: 66Member
    [b][red]This message was edited by Alexandrescu at 2005-5-8 11:53:29[/red][/b][hr]
    The bad news consist in the process' difficulty; because, for me, it seams the original poster is not some kind of C fan.

    P.S.: I always use to give people those pieces of advice that I know that they lead to the problem's solution and that I *think* that people can and have the will to follow. [ That's because I learned that whatever people can't do easy, they won't do at all. :-( ]




  • pmcastillopmcastillo Posts: 140Member
    [b][red]This message was edited by pmcastillo at 2005-10-27 7:48:12[/red][/b][hr]
    : [b][red]This message was edited by Alexandrescu at 2005-9-9 12:45:58[/red][/b][hr]
    : : HI!
    : : How can i link database (such as MS access) to prolog?
    : :
    : You can also try visual Prolog 6.2 - COMERCIAL EDITION. Too bad that it is not free! [the PERSONAL one is free, but doesn't provide the required features; I just downloaded it some 2 hours ago.]
    :
    : If money is not an issue - the COMERCIAL EDITION costs 299$ - then you may consider to follow the hiperlink:
    :
    : https://secure.pdc.dk/viporder/order.htm
    :
    : P.S. I'd like to know what are you going to do in order to solve your problem. Please let me know.
    :
    :
    :
    [blue]
    I'm new here... I'm wanna be a Computer Archeologist! =) Hehehe...

    1.) What is the oldest PROLOG? Is it the Borland Turbo Prolog 1986?

    2.) Is there any tutorial for Turbo Prolog?

    3.) I've already have Borland Turbo Prolog 2.0, is any Oldest Turbo Prolog (Borland Turbo Prolog 1.0)? Or the latest (Not the Visual Prolog)?

    [/blue]
  • AlexandrescuAlexandrescu Posts: 66Member
    No, Borland's prolog is much newer then the oldest one! That one was developed in 1980, in France, by Mr. Colmerauer and his team. That verssion wasn't devised for PCs, but I don't know which hardware was it devised to work on (Sorry about that; I think it was devised to work on some computer not to be found in Romania, because I really worked on any kind of computer in that country - that is what I used to do for a living until 1995).

    I have an Romanian implementation of Prolog that dates back in 1981 - devised to work on Z80 microprocessors; it loads from an audio casette - can you imagine that!?

    As for archaeology... Why on Earth would anyone do that since there is the SWI Prolog available for free?

    SWI Prolog is usable as it is both as interpreter and compiler.
    It was developed in an academic environment, so there is a big chance it works properly (and it does!).
    It also can be embedded into C sources and can encapsulate C code too.
    It is as easy integrable within C programms as it can be; this remains a challenge due to the great differences between the two languages.
    It is available as Linux and Windows executables and development packages.

    You can download this exceptional product from
    http://www.swi-prolog.org/download.html

    Try it! it's far beyond fun.
    ================================================
    ((cons(car X)(cdr X))X)
    holds(X,P):-P(X);holds(Y,P),IsA(X,Y).

    Any (more) questions? SHOOT!

  • pmcastillopmcastillo Posts: 140Member
    : No, Borland's prolog is much newer then the oldest one! That one was developed in 1980, in France, by Mr. Colmerauer and his team. That verssion wasn't devised for PCs, but I don't know which hardware was it devised to work on (Sorry about that; I think it was devised to work on some computer not to be found in Romania, because I really worked on any kind of computer in that country - that is what I used to do for a living until 1995).
    :
    : I have an Romanian implementation of Prolog that dates back in 1981 - devised to work on Z80 microprocessors; it loads from an audio casette - can you imagine that!?
    :
    : As for archaeology... Why on Earth would anyone do that since there is the SWI Prolog available for free?
    :
    [green]
    Yah... I just want to try some primitive program like Borland Turbo Prolog to see what it looks like =) ... Do know (or got) tutorials about Turbo Prolog? =)
    [/green]

    : SWI Prolog is usable as it is both as interpreter and compiler.
    : It was developed in an academic environment, so there is a big chance it works properly (and it does!).
    : It also can be embedded into C sources and can encapsulate C code too.
    : It is as easy integrable within C programms as it can be; this remains a challenge due to the great differences between the two languages.
    : It is available as Linux and Windows executables and development packages.
    :
    : You can download this exceptional product from
    : http://www.swi-prolog.org/download.html
    :
    : Try it! it's far beyond fun.
    : ================================================
    : ((cons(car X)(cdr X))X)
    : holds(X,P):-P(X);holds(Y,P),IsA(X,Y).
    :
    : Any (more) questions? SHOOT!
    :
    :

  • AlexandrescuAlexandrescu Posts: 66Member
    Turbo Prolog looks great - for such a DOS oldie.
    Try the following links:
    http://www.fraber.de/university/prolog/tprolog.html
    (you can download the Turbo Prolog and tutorials too from the above hyperlink)
    www.pcai.com/web/indexes/index_vol_1.html
    www.pcai.com/web/indexes/index_vol_2.html
    http://www.ulbra.tche.br/~danielnm/ia/intpro/intpro.html

    For more hyperlinks you should apply to goole; it is literally full with Prolog and the Turbo one.
    ================================================
    ((cons(car X)(cdr X))X)
    holds(X,P):-P(X);holds(Y,P),IsA(X,Y).

    Any (more) questions? SHOOT!

  • pmcastillopmcastillo Posts: 140Member
    : Turbo Prolog looks great - for such a DOS oldie.
    : Try the following links:
    : http://www.fraber.de/university/prolog/tprolog.html
    : (you can download the Turbo Prolog and tutorials too from the above hyperlink)

    [green]
    Ummmm.... I can't download it... It always ask my password... But I know my password is correct... Don't know why....
    [/code]


    : www.pcai.com/web/indexes/index_vol_1.html
    : www.pcai.com/web/indexes/index_vol_2.html
    : http://www.ulbra.tche.br/~danielnm/ia/intpro/intpro.html
    :

    [green]
    Ummm... Can't read french...
    [/green]

    : For more hyperlinks you should apply to goole; it is literally full with Prolog and the Turbo one.
    : ================================================
    : ((cons(car X)(cdr X))X)
    : holds(X,P):-P(X);holds(Y,P),IsA(X,Y).
    :
    : Any (more) questions? SHOOT!
    :
    :
    [green]
    Anyway, thanks man!
    [/green]
  • AlexandrescuAlexandrescu Posts: 66Member
    [b][red]This message was edited by Alexandrescu at 2005-10-28 22:38:4[/red][/b][hr]
    : : Turbo Prolog looks great - for such a DOS oldie.
    : : Try the following links:
    : : http://www.fraber.de/university/prolog/tprolog.html
    : : (you can download the Turbo Prolog and tutorials too from the above hyperlink)
    :
    : [green]
    : Ummmm.... I can't download it... It always ask my password... But I know my password is correct... Don't know why....
    : [/green]
    [red]
    Oh, I am sorry for that happened. I didn't try to do anything when I visited that location. Sorry.
    [/red]
    :
    :
    : : www.pcai.com/web/indexes/index_vol_1.html
    : : www.pcai.com/web/indexes/index_vol_2.html
    : : http://www.ulbra.tche.br/~danielnm/ia/intpro/intpro.html
    : :
    :
    : [green]
    : Ummm... Can't read french...
    : [/green]
    [red]
    Is it French you said? No way! I can read French and I am telling you that is deffinitely NOT that language. It sounded to me much like Spanish or Porugese; the very way your programmersheaven handler sounds to me.
    So I mistakenly assumed you could be a Spanish or a Portugese - able to read that page therefore.

    Sorry again!

    But you still can keep querrying Google as any other search engine.
    [/red]
    :
    : : For more hyperlinks you should apply to goole; it is literally full with Prolog and the Turbo one.
    : : ================================================
    : : ((cons(car X)(cdr X))X)
    : : holds(X,P):-P(X);holds(Y,P),IsA(X,Y).
    : :
    : : Any (more) questions? SHOOT!
    : :
    : :
    : [green]
    : Anyway, thanks man!
    : [/green]
    :
    [red]
    Do you really want some challenging project to programm in Prolog?
    Try to make Prolog generate some assembler lines that accomplish a given task; and those lines must be click-ticked optimised - so no human could outproggramm that automate programmer.
    IT IS NOT THAT DIFFICULT - but it still requires some immagination, since it is not that easy too.
    [/red]

    ================================================
    ((cons(car X)(cdr X))X)
    holds(X,P):-P(X);holds(Y,P),IsA(X,Y).

    Any (more) questions? SHOOT!



«1
Sign In or Register to comment.