You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Bart van der Schans <sc...@onehippo.com> on 2008/10/24 14:36:51 UTC

Mssql versus sqlserver

Hi,

In almost all cases MS SQL Server is referred to with the schema name 
'mssql' [1,2,3,4] except for the DbDataStore [5] for which the schema is 
called 'sqlserver'. The property to set the schema is also not called 
'schema', but 'databaseType'. These kind of inconsistencies can be quite 
frustrating when trying to configure your database connections through JNDI.

Whould it be an option to align the DbDataStore configuration with the 
other database configurations in the database connection configurations?

So, instead of:

   <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
     <param name="url" value="java:comp/env/jdbc/repositoryDS"/>
     <param name="driver" value="javax.naming.InitialContext"/>
     <param name="databaseType" value="sqlserver"/>
   </DataStore>

You would get:

   <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
     <param name="url" value="java:comp/env/jdbc/repositoryDS"/>
     <param name="driver" value="javax.naming.InitialContext"/>
     <param name="schema" value="mssql"/>
   </DataStore>

Regards,
Bart


[1] 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/mssql.ddl
[2] 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/mysql.ddl
[3] 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/mssql.ddl
[4] 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/mysql.ddl
[5] 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/data/db/sqlserver.properties


Re: Mssql versus sqlserver

Posted by Bart van der Schans <b....@onehippo.com>.
Thomas Müller wrote:
> Hi,
>
>> In almost all cases MS SQL Server is referred to with the schema name
>> 'mssql' [1,2,3,4] except for the DbDataStore [5] for which the schema is
>> called 'sqlserver'.
>
> I didn't think about that. I added support for 'mssql' in
> https://issues.apache.org/jira/browse/JCR-1835
>
> The reason for 'sqlserver' is: in the DbDataStore the database type is
> auto-detected when using JDBC (the second part in the database URL, so
> for jdbc:sqlserver:xyz the default database type is 'sqlserver'.

That does explain it. Thanks for the prompt fix.

>
>> The property to set the schema is also not called
>> 'schema', but 'databaseType'.
>
> I have logged a bug https://issues.apache.org/jira/browse/JCR-1836
> "Persistence: support property databaseType"
> What do you think about that?
The word 'schema' has a special meaning especially for dba's so it could
be confusing. Changing it to databaseType would be better imho and would
remove the remove the need for comments like at the bottom of
http://wiki.apache.org/jackrabbit/UsingJNDIDataSource  ;)

A disadvantage of changing the (default) parameter name is that it can
create some clutter in the documentation. I.e. "Since 1.6 the preferred
name is databaseType instead of schema". An option could be to add
support for it now (silently), and wait a few versions before actively
'pushing' the new name.

Regards,
Bart

Re: Mssql versus sqlserver

Posted by Thomas Müller <th...@day.com>.
Hi,

> In almost all cases MS SQL Server is referred to with the schema name
> 'mssql' [1,2,3,4] except for the DbDataStore [5] for which the schema is
> called 'sqlserver'.

I didn't think about that. I added support for 'mssql' in
https://issues.apache.org/jira/browse/JCR-1835

The reason for 'sqlserver' is: in the DbDataStore the database type is
auto-detected when using JDBC (the second part in the database URL, so
for jdbc:sqlserver:xyz the default database type is 'sqlserver'.

> The property to set the schema is also not called
> 'schema', but 'databaseType'.

I have logged a bug https://issues.apache.org/jira/browse/JCR-1836
"Persistence: support property databaseType"
What do you think about that?

Regards,
Thomas