Using SQL and databases in Tcl

It would be hard to talk about data storage and not mention relational databases. In this section, we will briefly review how Tcl interacts with different databases. We assume the reader is familiar with database concepts and SQL. If not, you can either skip this section, or learn about the topic from other sources first.

For demonstration purposes, in every database described, we will setup a database named Bookstore with the following tables and sample data:

CREATE DATABASE Bookstore CREATE TABLE Books ( title varchar(255), isbn varchar(255), PRIMARY KEY (isbn) ); CREATE TABLE Persons ( name varchar(255), surname varchar(255), CONSTRAINT pk PRIMARY KEY (name, surname) ); CREATE TABLE Authors ( book_id varchar(255), ...

Get Tcl 8.5 Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.