DatabaseReferenceListing of Supported Databases »
represents a fully specified reference to any SQL database.
- DatabaseReference[…] includes information on how to connect to a database, but does not actually perform the connection. The connection is automatically performed by functions like RelationalDatabase, as well as by database querying functions such EntityValue.
- In DatabaseReference[URL["url"]], "url" is typically of the form "backend://user:password@host:port/name".
- In DatabaseReference[assoc], typical elements of assoc include:
"Backend" the type of SQL backend used "Name" the name of the database, or path to it "Host" the host serving the database "Port" the server port through which to access the database "Username" the username used to authenticate the database "Password" the password used to authenticate the database
- Possible values for "Backend" include "SQLite", "PostgreSQL", "MySQL", "MicrosoftSQL", "Oracle".
- For file-based databases such as SQLite, "Name" gives the path to the file containing the database.
- For server-based databases, "Name" gives the name of the database at the specified endpoint.
- For file-based databases, no values need to be specified for "Host" and "Port".
- For server-based databases, "Host" can be a network host name or an IP address, specified with a string or using an IPAddress object.
- If no value for "Port" is specified, a default for each type of backend will be used.
- DatabaseReference[…][prop] gives information about the database being referenced.
- The property prop can be any of the elements that can be supplied in DatabaseReference[assoc], as well as:
"Connected" whether there is an active connection to the database
Examplesopen allclose all
Basic Examples (3)
Extract properties from a DatabaseReference:
Properties & Relations (1)
Construct a DatabaseReference pointing to a file:
Possible Issues (1)
A DatabaseReference does not guarantee the existence of the database: