Data Source Name

Data Source Name

Der Data Source Name (DSN) ist eine Datenstruktur (ähnlich einer URL oder einem Dateipfad), welche bei Datenbankabstraktionsframeworks (Datenbankabstraktionsschicht) wie ODBC (Open Database Connectivity), JDBC oder ADOdb die Zugangsdaten beschreibt, die ein Treiber benötigt, um eine Verbindung zu einer bestimmten Datenbank auf Basis eines spezifischen RDBMSs herzustellen.

Die DSN enthält Informationen wie den Namen, das Verzeichnis, und den Treiber der Datenbank, und, basierend auf dem Typ der DSN, die ID und das Passwort des Benutzers.

Je nach Framework unterscheidet sich die Notation der DSN zum Teil gravierend:

Inhaltsverzeichnis

Verschiedene Notationen

JDBC

  jdbc:sybase://127.0.0.1:700/MyDataBase

PEAR::db (PHP Framework)

  mysql://root:rootpw@localhost/MyDataBase

ODBC

Für ODBC-DSNs existieren verschiedene Darstellungsformen. Entweder werden die DSNs 'hartverdrahtet' und als DSN-lose Verbindung direkt im Programmcode eingebaut. Dann ist die Darstellung wie folgt:

  DBQ=C:\TEST\QUERY FILES;DefaultDir=C:\TEST\QUERY FILES; _
  Deleted=1;Driver={Microsoft dBase Driver (*.dbf)}; _
  DriverId=277;FIL=dBase IV;PageTimeout=600;Statistics=0

Darüber hinaus besteht die Möglichkeit, die DSN in der Registry (in älteren Versionen von MS-Query) oder in sogenannten File DSNs zu speichern. Diese Bezeichnung ist von Microsoft etwas unglücklich gewählt, da es sich nicht um eine DSN-Referenz AUF eine Datei (z.B. XML-Datei) sondern um eine DSN-Referenz IN einer Datei handelt.

Dementsprechend kann eine file DSN bzw. eine DSN-Datei die Daten in einer Notation ähnlich wie in einer .ini-Datei enthalten:

  [ODBC]
  DRIVER=Microsoft Excel Driver (*.xls)
  UID=admin
  UserCommitSync=Yes
  Threads=3
  SafeTransactions=0
  ReadOnly=1
  PageTimeout=5
  MaxScanRows=8
  MaxBufferSize=512
  ImplicitCommitSync=Yes
  FIL=excel 5.0
  DriverId=790
  DefaultDir=<drive letter>:\ 
  DBQ=<drive letter>:\<source filename>


ODBC unterscheidet drei Arten von DSN:

  • Benutzer-DSN (User DSN)
  • System-DSN (Machine DSN)
  • Datei-DSN (File DSN)

Benutzer- und System-DSNs sind rechnerspezifisch und speichern die DSN-Informationen in der Registrierung. Ein Benutzer-DSN erlaubt Datenbankzugriffe für einen einzelnen Benutzer auf einem einzelnen Rechner, ein System-DSN für jeden Benutzer eines bestimmten Rechners. Ein Datei-DSN enthält relevante Informationen in einer Textdatei mit einer .DSN Dateiendung und kann von mehreren Benutzern und von mehreren Rechnern genutzt werden, wenn sie dieselben Datenbank-Treiber installiert haben.

Weblinks


Wikimedia Foundation.

Игры ⚽ Нужна курсовая?

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Data Source Name — In computing, a data source name (DSN, sometimes known as a database source name though data sources are not limited to databases) are data structures used to describe a connection to a data source. Most commonly used in reference to ODBC, DSNs… …   Wikipedia

  • Database Source Name — A data source name (DSN) is a data structure that contains the information about a specific database that an Open Database Connectivity (ODBC) driver needs in order to connect to it. Included in the DSN, which resides either in the registry or as …   Wikipedia

  • Database Source Name — Der Data Source Name (DSN) ist eine Datenstruktur (ähnlich einer URL oder einem Dateipfad), welche bei Datenbankabstraktionsframeworks (Datenbankabstraktionsschicht) wie ODBC (Open Database Connectivity), JDBC oder ADOdb die Zugangsdaten… …   Deutsch Wikipedia

  • Data source — A data source is any of the following types of sources for (mostly) digitized data: a database in the Java software platform, datasource is a special name for the connection set up to a database from a server a computer file a data stream This… …   Wikipedia

  • Data virtualization — describes the process of abstracting disparate data sources (databases, applications, file repositories, websites, data services vendors, etc.) through a single data access layer (which may be any of several data access mechanisms). This… …   Wikipedia

  • Data mapping — Data transformation/Source transformation Concepts metadata · data mapping data transformation · model transf …   Wikipedia

  • Data Transmission Network — DTN, formerly known as Data Transmission Network, is a subscription based service for the delivery of real time weather, agricultural and commodity market information. Telvent DTN is the name of the service that is owned by its parent company… …   Wikipedia

  • Data Format Description Language — (DFDL, often pronounced daff o dil) is a modeling language from the Open Grid Forum for describing general text and binary data. A DFDL model or schema allows any text or binary data to be read (or parsed ) from its native format and to be… …   Wikipedia

  • Data compression — Source coding redirects here. For the term in computer programming, see Source code. In computer science and information theory, data compression, source coding or bit rate reduction is the process of encoding information using fewer bits than… …   Wikipedia

  • Data Vault Modeling — is a database modeling method that is designed to provide historical storage of data coming in from multiple operational systems. It is also a method of looking at historical data that, apart from the modeling aspect, deals with issues such as… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”