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
22 * <p>There will be three ADO.NET providers that will use TDS.
24 <p>1. 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 <p>2. 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 <p>3. 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.
48 * BUILDING THE NEW PROVIDERS
51 * All three providers will use common internal code
52 at Mono.Data.TdsClient.Internal. Any classes in
53 Mono.Data.TdsClient.Internal will have the internal
54 keyword and will be built with the assembly of that provider.
56 * <p>1. SqlClient will build its assembly System.Data using files
57 from System.Data, System.Data.SqlClient, System.Data.SqlTypes,
58 System.Data.Common, and Mono.Data.TdsClient.Internal.
61 will only reference the usual
62 suspects: corlib.dll, System.dll, and System.Xml.dll. SqlClient will be
63 a wrapper around TdsClient.Internal, but provide specific functionality to
64 Microsoft SQL Server 7.0/2000 databases.
66 <p>SqlClient build example:
69 mcs -target:library -out:System.Data.dll \
70 System.Data.SqlClient/*.cs \
71 ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs \
72 [any other classes in System.Data assembly...] \
73 -r corlib.dll -r System.dll -r System.Xml.dll
76 * <p>2. SybaseClient will build its assembly Mono.Data.SybaseClient using
77 files from Mono.Data.SybaseClient and Mono.Data.TdsClient.Internal.
78 SybaseClient will reference
79 the usual suspects plus System.Data.dll SybaseClient will
80 be a wrapper around TdsClient.Internal, but provide specific
81 functionality to Sybase.
83 <p>SybaseClient build example:
86 mcs -target:library -out:Mono.Data.SybaseClient.dll \
87 Mono.Data.SybaseClient\*.cs \
88 ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs
89 -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
92 * <p>3. TdsClient will build its assembly Mono.Data.TdsClient
93 using files from Mono.Data.TdsClient
94 and Mono.Data.TdsClient.Internal. TdsClient will reference the
95 usual suspects plus System.Data.dll TdsClient is a wrapper
96 provider around TdsClient.Internal used for generic
97 unit tests. TdsClient will a wrapper around TdsClient.Internal
98 as a generic TDS provider
99 and allow TDS configuration options not exposed in SqlClient
100 nor SybaseClient, such as, TdsVersion will be exposed in TdsClient
101 but not in SqlClient nor SybaseClient.
103 <p>TdsClient build example:
106 mcs -target:library -out:Mono.Data.TdsClient.dll \
107 Mono.Data.TdsClient\*.cs \
108 Mono.Data.TdsClient.Internal\*.cs \
109 -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
112 * Classes in Mono.Data.TdsClient.Internal will:
116 * use the internal keyword to prevent exposing these classes
117 to the System.Data.dll assembly.
119 * implement the ADO.NET interfaces just like any other ADO.NET provider, such as,
120 IDbConnection, IDbCommand, IDataReader, IDataRecord, IDataAdapter, etc...
122 * be sealed just like other providers
124 * provide features to be directly used by the SqlClient and SybaseClient
126 as, setting the default TDS version: SqlClient to 7.0 and SybaseClient
127 to 5.0 and TdsClient to 4.2.
129 * be written completely in C# or IL assembly language (if need be).
131 * implement the TDS protocol version 4.2, 5.0, 7.0, and 8.0. This
133 work will take place.
135 * be an internal ADO.NET provider to the public ADO.NET providers:
136 System.Data.SqlClient, Mono.Data.SybaseClient, and Mono.Data.TdsClient.
138 * Implementation Details of the TDS Protocol
141 * will be implemented in pure C# from scratch
143 * will reside in Mono.Data.TdsClient.Internal
145 * 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>
164 * Anybody willing to help? If so, reply to this email or
165 contact any of the people working on the ADO.NET support
166 in Mono: Rodrigo Moya, Tim Coleman, Daniel Morgan, Brian Ritchie,
167 Vladimir Vukicevic, Ville Palo, Franklin Wise, and others.