Database Identifier (db-uri)
A Uniform Resource Identifier (URI) is a string of characters that provides a compact and standardized way to identify and locate resources on the internet. It serves as a unique address for various resources such as web pages, images, documents, or any other type of file accessible via the internet.
A URI consists of two main components: the scheme and the path. The scheme indicates the protocol or mechanism used to access the resource, such as "http://
" for a web page or "ftp://
" for a file transfer. The path specifies the location of the resource within the scheme, including any directories, subdirectories, or in the case of RaimaDB, database name.
RaimaDB uses the URI format to designate the TFS where the database is located, the communication transport to be used to access that TFS, and the name of the database to open on the target TFS ("tfs-tcp://demodb.raima.com:21560/BOOKSTORE
"). The syntax for the naming convention is:
db-uri: [ tfs-uri '/'] database_name
For clarity, the tfs-uri
represents the host and communication transport of the db-uri
. The db-uri
includes the tfs-uri
and the database name.
Example DB-URI
Database Name | Description |
---|---|
bookStore | "bookStore" on embedded TFS. |
tfs:///bookStore | "bookStore" on default TFS using default transport and port number. |
tfs-tcp://www.raima.com/bookStore | "bookStore" using TCP/IP with the default port number at hostname "www.raima.com" |
tfs-shm://21553/bookStore | "bookStore" using default shared-memory to TFS |
tfs-shm://partition-01/bookStore | "bookStore" using shared-memory to TFS named "partition-01" |
tfs-shm-poll://0/bookStore | "bookStore" using channel 0 with the shared-memory poll transport (seeShared Memory Poll Transport). |
tfs-tcp://[::1]:1530/bookStore | "bookStore" using TCP/IP IPv6 using the loopback address on port 1530 |
tfs-tcp://[fe80::40da:bf3f:ae9f:fe87]:2000/bookStore | "bookStore" using TCP/IP IPv6 to a specified machine on port 2000. |
tfs-tcp://192.168.101.139:2000/bookStore | "bookStore" using TCP/IP IPv4 to a specified machine on port 2000. |
Specifying a database name will by default open the database in the
current working directory. However, specifying a database URI will open
the database on a remote TFServer. Examples of database name or URIs:
'MY_DB', 'tfs-tcp://localhost:21553/MY_DB
', 'tfs-shm://MY_TFS/MY_DB
'
A tfs-uri
is required for connecting to external TFS.
An empty tfs-uri
is required to connect to an in-process TFS (embedded).
Transport Layer Security (TLS)
RaimaDB implements optional Transport Layer Security (TLS) using OpenSSL technology. The OpenSSL libraries provide for secure, encrypted communications over between the remote RaimaDB client and the TFS.
The TFS provides the ability to register a developer provided private key and a certificate for the TLS encryption. By default, the TFS contains a built in private key and certificate but it is highly discouraged to use the default key / certificate pair in production. The default key / certificate pair does not have an expiration.
The RaimaDB API on the client side provides for retrieving the TLS certificate from the server so it can be validated.
RaimaDB does not perform any validation of the certificate. After the certificate is retrieved, the developer would need to add the code to validate that the certificate is valid.
RaimaDB does not provide any mechanism to hide the private key and certificate on the server side. The developer or customer would need to take action to ensure the private key is secured on the server side (the private key must be provided on the command line of rdm-tfs
or rdm-sql
).