Blake
Blake

Reputation: 157

How to use database that is on FTP server without downloading it?

I want to use SQLite database which is on FTP server without downloading it. Is it possible to use this database directly?

Upvotes: 2

Views: 2034

Answers (3)

Mattias
Mattias

Reputation: 9481

I do not now how SQLite works, but if you have your database-files on the server, for the sake of argument, assume you can mount the the filesystem over ftp and run a local SQLite-server which talks to the mounted files.

According to how the ftp-protocol is designed if your database is just one file, the system will download the whole file even if you just want the first row, each time the file are needed (if we not use file-cache). If your database is multiple files each file will be downloaded when they are needed. As Pavel Krymets said, it will be slow, so it is not recommended.

Upvotes: 1

Alberto Spelta
Alberto Spelta

Reputation: 3678

The connection strings for data providers used by SQLite only supports UNC paths, URL parameters are not supported. You must download the file locally.

Upvotes: 1

Ferruccio
Ferruccio

Reputation: 100658

No, the FTP protocol is designed to sequentially transfer the entire contents of files. There is no way to perform random reads/writes to a file, which is necessary for SQLite (or any database program) to work.

Upvotes: 7

Related Questions