7

I want to construct a local database for my program which has to be filled with user preffered settings, searched websites and so on.

But what i could find on internet(google and this website) is just about a database from a server or local database with a specific dialects, exclusive racket which is the most popular of all scheme dialects.

Here are the informations from racket documentation for database:

Web Applications in scheme

Using Database connectivity

As far as i see, there is no information or no example about using a local database with racket.

Can anybody give a small example to construct and to use a local database with scheme (racket) ?

Asqan
  • 4,319
  • 11
  • 61
  • 100
  • Did you see this: http://docs.racket-lang.org/db/ ? – uselpa Mar 15 '13 at 18:41
  • yes sure, there you can learn how to use a database but not how to construct, use, and load a local database, i think – Asqan Mar 15 '13 at 18:45
  • Then I'd suggest trying SQLite (the easiest to start with) and look for an appropriate tutorial (google for "sqlite tutorial"). – uselpa Mar 15 '13 at 19:02

1 Answers1

10

SQLite uses local database files:

(require db)
(define c (sqlite3-connect #:database "path/to/db-file" #:mode 'create)

The racket db docs assume you already know how to use the database system, so first read the SQLite docs. Then read the racket db docs to find out how to send SQL commands to the SQLite database.

Ryan Culpepper
  • 10,495
  • 4
  • 31
  • 30