Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion merits of 2 different methods of interfacing Racket to a database
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Don Green  
View profile  
 More options Sep 30 2012, 10:33 pm
From: Don Green <infodeveloper...@gmail.com>
Date: Sun, 30 Sep 2012 20:31:39 -0600
Local: Sun, Sep 30 2012 10:31 pm
Subject: [racket] merits of 2 different methods of interfacing Racket to a database

Please comment on the merits of 2 different methods of interfacing Racket
to a database.

 My use of the term ".import", is in reference to the SQLite3 database dot
command.

Is Method B preferable to Method A? If so, why?

 Method A

Instead of using the Racket: connection function: (define db1
(sqlite3-connect ...

I can use Racket's 'system' function, to issue SQLite3 dot commands such as
'.import' to load a million lines of data from a file into a new SQLite db.

I can then proceed to use Racket's SQL db access commands to insert or
select data.

 OR

 Method B

Use the Racket: connection function: (define db1 (sqlite3-connect ...

Racket does not implement SQLite dot commands, so either:

a) write a million Racket SQL commands such as:

(query-exec db1 "insert into table1 values ('a1', 'b2' 'c3')")

(query-exec db1 "insert into table1 values ('aaa', 'bbb' 'ccc')")

etc.

 OR

 b) write a function:

(query-exec db1 "insert into table1 values (list-loop)")

where:merits of 2 different methods of interfacing Racket to a database

(list-loop) is a function that loops through each of the million lines in a
data file that are intended for the database: db1.

THANKS.
 Filter settings

____________________
  Racket Users list:
  http://lists.racket-lang.org/users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.