Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
databasereferencecheatsheet [2025/04/21 12:40] amyw [MySQL] |
databasereferencecheatsheet [2025/04/22 15:19] (current) wikiadmin [SQLite] |
||
---|---|---|---|
Line 11: | Line 11: | ||
The JDBC driver that is compatible with java8 (jre8) could be found at: | The JDBC driver that is compatible with java8 (jre8) could be found at: | ||
- | https:// | + | https:// |
**Database Driver Class**: com.microsoft.sqlserver.jdbc.SQLServerDriver | **Database Driver Class**: com.microsoft.sqlserver.jdbc.SQLServerDriver | ||
Line 31: | Line 31: | ||
**Database Driver Class**: com.mysql.cj.jdbc.Driver (this has changed, but older drivers will use com.mysql.jdbc.Driver) | **Database Driver Class**: com.mysql.cj.jdbc.Driver (this has changed, but older drivers will use com.mysql.jdbc.Driver) | ||
- | **Database URL**: < | + | **Database URL**: < |
- | or, with parameters, such as: | + | jdbc: |
- | | + | or, with parameters, such as: |
+ | jdbc: | ||
+ | jdbc: | ||
+ | Default port is 3306. The timezone may not be required - depends on the timezone of the server. | ||
+ | jdbc: | ||
====MariaDB==== | ====MariaDB==== | ||
Line 71: | Line 75: | ||
SQLite is a file based database, so the format of the URL will not include the " | SQLite is a file based database, so the format of the URL will not include the " | ||
- | get the latest JDBC driver: https://www.sqlite.org/download.html (the driver is included in the distribution, | + | get the latest JDBC driver |
+ | https://sourceforge.net/ | ||
**Database Driver Class**: org.sqlite.JDBC | **Database Driver Class**: org.sqlite.JDBC | ||
**Database URL**: < | **Database URL**: < | ||
+ | |||
+ | Example: jdbc: | ||
+ | |||
+ | This will create a file called testdb.sqlite in the directory where the application is running. When testing in MIStudio this will be the MIStudio main directory. If you are testing in TransSECS (Builder) this file will appear in the TransSECS/ | ||
Note: usually add .sqlite to the file name for SQLite databases, so for example, db_name.sqlite | Note: usually add .sqlite to the file name for SQLite databases, so for example, db_name.sqlite | ||
Line 81: | Line 90: | ||
====SQL Server Express==== | ====SQL Server Express==== | ||
- | The latest | + | The JDBC driver |
- | [[https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server? | + | [[https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc/ |
JDBC needs to be a Jar in the “drivers” directory of the project. | JDBC needs to be a Jar in the “drivers” directory of the project. |