1 * Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono
4 * After much discussion among the Mono ADO.NET developers,
5 we have come up with the design of implementing a Sybase and Microsoft
6 SQL Server ADO.NET provider. We have already begun implementing
9 * Since Sybase and Microsoft SQL Server databases both
10 use the TDS protocol for data access, and other implementations
11 of TDS (FreeTDS and jTDS) have included support for multiple
12 versions of the TDS, we have decided to do the same.
14 * The TdsClient ADO.NET provider will be Mono's first provider
15 written completely in C# without any dependencies except
16 the usual suspects: corlib.dll, System.dll, and System.Xml.dll.
19 * New ADO.NET Providers
21 <p>There will be three ADO.NET providers that will use TDS.
24 <li><p>Mono.Data.SybaseClient namepace and assembly will
25 hold the ADO.NET provider for Sybase SQL Server database.
26 This provider will default to using TDS version 5.0 which
27 can only be used with Sybase.
29 <li><p>System.Data.SqlClient namespace and System.Data assembly
30 will hold the ADO.NET provider
31 for Microsoft SQL Server 7.0/2000 databases. This is to be
32 compatible with Microsoft .NET
33 This provider will default to using TDS version 7.0
34 which only supports Microsoft SQL Server 7.0/2000 just like
35 SqlClient in Microsoft .NET does. There is TDS version of 8.0
36 which we will need to support as well, but it is used for
37 Microsoft SQL Server 2000 databases.
39 <li><p>Mono.Data.TdsClient namespace and assembly is not
40 meant to be an ADO.NET provider in Mono, but a means to
41 provide generic unit tests for the TDS functionality shared by the SqlClient
42 and SybaseClient providers. This provider will default to
43 using TDS version 4.2 which can be used by older Sybase and
44 Microsoft SQL Server databases.
47 * Building The New Providers
49 <p> All three providers will use common internal code
50 at Mono.Data.TdsClient.Internal. Any classes in
51 Mono.Data.TdsClient.Internal will have the internal
52 keyword and will be built with the assembly of that provider.
54 <li><p>SqlClient will build its assembly System.Data using files
55 from System.Data, System.Data.SqlClient, System.Data.SqlTypes,
56 System.Data.Common, and Mono.Data.TdsClient.Internal.
59 will only reference the usual
60 suspects: corlib.dll, System.dll, and System.Xml.dll. SqlClient will be
61 a wrapper around TdsClient.Internal, but provide specific functionality to
62 Microsoft SQL Server 7.0/2000 databases.
64 <p>SqlClient build example:
67 mcs -target:library -out:System.Data.dll \
68 System.Data.SqlClient/*.cs \
69 ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs \
70 [any other classes in System.Data assembly...] \
71 -r corlib.dll -r System.dll -r System.Xml.dll
74 <li><p>SybaseClient will build its assembly Mono.Data.SybaseClient using
75 files from Mono.Data.SybaseClient and Mono.Data.TdsClient.Internal.
76 SybaseClient will reference
77 the usual suspects plus System.Data.dll SybaseClient will
78 be a wrapper around TdsClient.Internal, but provide specific
79 functionality to Sybase.
81 <p>SybaseClient build example:
84 mcs -target:library -out:Mono.Data.SybaseClient.dll \
85 Mono.Data.SybaseClient\*.cs \
86 ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs
87 -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
90 <li><p>TdsClient will build its assembly Mono.Data.TdsClient
91 using files from Mono.Data.TdsClient
92 and Mono.Data.TdsClient.Internal. TdsClient will reference the
93 usual suspects plus System.Data.dll TdsClient is a wrapper
94 provider around TdsClient.Internal used for generic
95 unit tests. TdsClient will a wrapper around TdsClient.Internal
96 as a generic TDS provider
97 and allow TDS configuration options not exposed in SqlClient
98 nor SybaseClient, such as, TdsVersion will be exposed in TdsClient
99 but not in SqlClient nor SybaseClient.
101 <p>TdsClient build example:
104 mcs -target:library -out:Mono.Data.TdsClient.dll \
105 Mono.Data.TdsClient\*.cs \
106 Mono.Data.TdsClient.Internal\*.cs \
107 -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
111 * Classes in Mono.Data.TdsClient.Internal will:
114 <li>use the internal keyword to prevent exposing these classes
115 to the System.Data.dll assembly.
117 <li> implement the ADO.NET interfaces just like any other ADO.NET provider, such as,
118 IDbConnection, IDbCommand, IDataReader, IDataRecord, IDataAdapter, etc...
120 <li> be sealed just like other providers
122 <li> provide features to be directly used by the SqlClient and SybaseClient
124 as, setting the default TDS version: SqlClient to 7.0 and SybaseClient
125 to 5.0 and TdsClient to 4.2.
127 <li> be written completely in C# or IL assembly language (if need be).
129 <li> implement the TDS protocol version 4.2, 5.0, 7.0, and 8.0. This
131 work will take place.
133 <li> be an internal ADO.NET provider to the public ADO.NET providers:
134 System.Data.SqlClient, Mono.Data.SybaseClient, and Mono.Data.TdsClient.
137 * Implementation Details of the TDS Protocol
140 * will be implemented in pure C# from scratch
142 * will reside in Mono.Data.TdsClient.Internal
144 * will use FreeTDS and jTDS as rerferences.
150 * <a href="http://www.freetds.org/">FreeTDS</a> is C API that implements
151 the TDS protocol. Has libraries for tds, ctlib, and dblib. It builds
152 and runs on Windows, Linux, and other platforms. FreeTDS provides
153 data access to Microsoft SQL Server and Sybase databases.
155 * <a href="http://jtds.sf.net/">jTDS</a> is a 100% Java JDBC provider
156 for Microsoft SQL Server and Sybase databases.
158 * <a href="http://www.freetds.org/tds.html">TDS Protocol</a>
163 <p>Anybody willing to help? If so,
164 contact any of the people working on the ADO.NET support
165 in Mono: Rodrigo Moya, Tim Coleman, Daniel Morgan, Brian Ritchie,
166 Vladimir Vukicevic, Ville Palo, Franklin Wise, and others.