• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux octave-db Download

octave-db

April 22, 2008
Octave-db provides database bindings for executing SQL queries and performing other database operations.
Version 031008
License BSD License
Platform Linux
Supported Languages English
Homepage octave-swig.sourceforge.net
Developed by Xavier Delacour
Octave-db is a software that provides bindings for executing SQL queries and other database operations on various databases directly from Octave. It supports Postgres, MySQL, SQLite, and standard ODBC databases. To maintain a uniform interface throughout the various database types, Octave-db offers a simplified interface that you can use to call any database: execute queries on a given database with the command, sql(db,query). In the event that the query returns anything, for example, SELECT, it is converted to a cell array.

Octave-db also provides a way to remember a database through default_db(db), so that you can subsequently issue queries with just sql(query). The software offers four types of database objects; postgres_db, mysql_db, sqlite3_db, and odbc_db, which can be constructed by merely calling them with connection parameters, contingent on the database type.

Octave-db exposes the entire C client API for each database, such as libpq, libmysqlclient, among others. Users can execute these APIs, as in the case with the following examples.

To create a table, insert data, and execute a query on an SQLite database, you would use the following commands:

octave:1> sqlite3
octave:2> db=sqlite3_db(":memory:");
octave:3> sql(db,"create table some_table (id int4,val int4);");
octave:4> sql(db,"insert into some_table (id,val) values (1,10);");
octave:5> sql(db,"insert into some_table (id,val) values (2,9);");
octave:6> sql(db,"insert into some_table (id,val) values (3,8);");
octave:7> sql(db,"insert into some_table (id,val) values (4,7);");
octave:8> a=cell2mat(sql(db,"select * from some_table;"))

To execute a query on a PostgreSQL database, set a default database, create a table, insert data, and execute the query:

octave:1> postgres
octave:2> default_db(postgres_db("host=localhost dbname=testdb user=testuser password='secret' "));
octave:3> try, sql("drop table some_table;"); catch end_try_catch
octave:4> sql("create table some_table (id int4,str varchar);");
octave:5> sql("insert into some_table (id,str) values (1,'a');");
octave:6> sql("insert into some_table (id,str) values (2,'b');");
octave:7> sql("insert into some_table (id,str) values (3,'c');");
octave:8> sql("insert into some_table (id,str) values (4,'d');");
octave:9> a=sql("select * from some_table;")
octave:10> assert(a{1,1}==1);
octave:11> assert(strcmp(a{1,2},"a"));

For a MySQL database, use the following commands to initialize, connect, and fetch data:

octave:1> mysql
octave:2> db=mysql_init();
octave:3> res=mysql_real_connect(db,"localhost","root","secret","testdb");
octave:4> if (swig_this(res)!=swig_this(db))
> error("
What's New

Version 031008: N/A

Free Download 84K
324
  • Share on:

Most Popular

  1. Quicksilver Forums 1.4.2
    152
  2. Dvgrab 3.4
    95
  3. DynVPN 1.0
    86
  4. CherryTV 0.1
    82
  5. SlideMap 1.2.2
    73
  6. porm r2
    68
  7. fuseftp 0.8
    67
  8. K!rash 1.0
    67
  9. Swiftfox 3.0b5pre-2
    66
  10. Free Orion 0.3.13
    66

Related Downloads

Georg's Melon Adventure
This is a fast-paced, arcade-style game featuring 2D shooter action. It offers ...
Kinonk
Kinonk is a C++ program designed for Pentominoes, offering comprehensive functionality for ...
Theming Expantion Pack
The Theming Expansion Pack is an add-on for eyeOS that enables users ...
Forum.hr Forum Meni
Forum.hr Forum Meni Firefox extension simplifies navigation on Forum.hr by providing easy ...
linux-ftpd-ssl
The linux-ftpd-ssl project is a secure FTP server that includes support for ...
Amarok XM Tuner
Amarok XM Tuner is a software script that enables playing xmonline channels ...
Linux Kernel
The Linux Kernel is the fundamental component of Linux OS.
Trinux
Trinux is a Linux distribution that utilizes a ramdisk for booting and ...
Magic Thumb
Magic Thumb is a JavaScript-based tool that enlarges thumbnail images using a ...
Java Project Creator
The Java Project Creator enables users to create .java files with ease. ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.