Sorry, I think I hit send without adding a reply message; here it is.
On 2013.11.22 5:13 PM, David E. Wheeler wrote:
First, I'm using the database name as the scheme in the URL. Some examples: postgresql://user@localhost:5433/dbname sqlite:///path/to/foo.db
By "database name" do you mean "DBMS name"? Because I'd say the "database name" is what's on the right-hand side of the //, not what's on the left.
Another thing I was going to say is, if you wanted some standardization, you should distinguish the parts that are necessary to connect to a database from parts that just select a default schema in the database for interacting with.
By that I mean, remember that a PostgreSQL "database" and a MySQL "database" aren't actually the same concept. A PostgreSQL DBMS server gives access to multiple disjoint databases where you must name one to connect, and then separately from that is the optional concept of the current schema that you can select. A MySQL DBMS server gives access to exactly 1 database, which you can connect to without specifying a "database name", and selecting a current schema (what they call a "database") is optional for using MySQL.
The reason I say this is that DBI's uri scheme uses the same syntax for both "database" even though how they're treated is actually very different. And you don't have to do the same.
-- Darren Duncan