Oracle's XML implementation?Oracle has implemented XML through the XML DB component of the database tutorial, which is the standard feature of the Enterprise and Standard editions. Oracle XML DB can be easily installed through the database Configuration Assistant (DBCA) or by running a directory script catqm.sql. The XML DB product provides all the features discussed in this article.
To verify that the XML
quite a few.
ODBCYes. NET Framework1.1New features can be used for other types of databasesODBC.
Therefore, the above two connection methods are enhancedSPLMore powerful support for multiple databases.
SPL3.0In the previous version2.0Is partially modified.BUGAnd added some new features.
SPL3.0RevisedBUG:
1.PairOracleAn error is reported when the database compares dates.OracleThe da
In many applications, although the general use of a database operation, but due to the needs of various situations, the business system may be deployed in different types of databases, if the development of the system can easily support a variety of database switching, it can reduce the number of problems for us, while improving the adaptability and robustness of
MySql
Type name
Display Length
Database Type
JAVA type
JDBC index (int)
Description
VARCHAR
L + N
VARCHAR
Java. lang. String
12
CHAR
N
CHAR
Java. lang. String
1
BLOB
L + N
BLOB
Java. lang. byte []
-4
TEXT
65535
VARCHAR
Java. lang. String
-1
INTEGER
4
MySql connector JAVA type name display length Database Type JAVA type JDBC Type Index (int) Description VARCHARLNVARCHARjava. lang. String12CHARNCHARjava. lang. String1BLOBLNBLOBjava. lang. byte []-4TEXT65535VARCHARjava. lang. S
MySql ----------------------------------- JAVA type name display length Database Type JAVA type JDBC Type Index (int) Description varchar ln varchar java. lang. string 12 char n cha
SQLite is especially convenient for storing mobile phone data, but I found some problems during usage:
Data Type:
Case Insensitive
Text Text
Numeric Value
Integer Integer
Real Decimal
None No type
The above data type is correct.
1. However, if you use other data types such as varchar to create a table, an error occurs. You cannot create a table.
2. If you have used some SQLite table creation tools to create tables, including v
Underlying data type
Java type
SQL type
int or Java.lang.Integer
INTEGER
Long or Java.lang.Long
BIGINT
Short or Java.lang.Short
SMALLINT
float or java.lang.Float
FLOAT
Double or java.lang.Double
DOUBLE
Java.math.BigDecimal
NUMERIC
Java.lang.String
VARCHAR
byte or Java.lang.Byte
TINYINT
Boolean or Java.lang.Boolean
1. Notes 1. when the database field is of the blob type, the setBinaryStream (int, InputStream, int) method in PreparedStatement must be used; 2. when the database field is of the longblob type, you must use setBin in PreparedStatement. 1. Notes
1. when the database field isBlobType, must usePreparedStatementInSetBinaryStream (int, InputStream, int)Method;2. when
The work often tells a database server about JDBC connection information, not the database version, so that development is not afraid to use the latest features of the database. I wrote a small program to detect the remote database server type:
Import java.sql.Connection; Import Java.sql.DatabaseMetaData; Import Java.
Text nvarchar (N)
Note ntext
Number (long integer) int
Integer smallint
Number (single precision) Real
Number (Double Precision) float
Number (byte) tinyint
Currency Money
Date smalldatetime
Boolean
Appendix: the script for converting to SQL.
Alter table tb alter column AA byte number [bytes]Alter table tb alter column AA long number [long integer]Alter table tb alter column AA short number [integer]Alter table tb alter column AA single number [single precisionAlter table tb alter column AA dou
Use Java to access images and other types of files in the MySQL database1. Notes
1. When the database field isBlobType, must usePreparedStatementInSetBinaryStream (int, InputStream, int)Method;2. When the database field isLongblobType, must usePreparedStatementInSetBinaryStream (int, InputStream, long)Method.Otherwise, an error such as the question is thrown:Exce
Tags: and time Retrieve SQL database pos type automatic datatime readabilityDatetimeUsed when you need a value that contains both date and time information. MySQL retrieves and displays the datetime value in ' yyyy-mm-dd HH:MM:SS ' format, supported by ' 1000-01-01 00:00:00 ' to ' 9999-12-31 23:59:59 '. 8 bytes of storage.DATEWhen you need only a date value, there is no time part. MySQL retrieves and displays the date value in ' YYYY-MM-DD ' format, s
Label:--Query database allSELECT (case if A.colorder=1 then d.name else null end) Table name,A.colorder field ordinal, a.name field name,IsNull (G.[value], ") as [description]From Syscolumns ALeft join Systypes B on A.xtype=b.xusertypeINNER JOIN sysobjects D on a.id=d.id and d.xtype= ' U ' and d.nameLeft join syscomments E on a.cdefault=e.idLeft joins Sys.extended_properties G on a.id=g.major_id and a.colid=g.minor_idLeft join Sys.extended_properties
(' 1-2-31 ')--Accurate acquisition of timeSelect Sysdatetime () --Data conversion, function conversion--castSelect CAST (123 as varchar (20))-value type converted to stringSelect CAST (1.23 as int)--decimal type converted to intSelect CAST (123 as Decimal (18,2))--int type converted to decimalSelect CAST (' 1.23 ' as Decimal (18,2))--Convert string type to decimalSelect CAST (' 12.3 ' as int)--String to int --convert--Front write type, behind write original data, with cast oppositeSelect CONVE
The code for database instantiation operations is optimized, and the core classes are simplified ...... This post was last edited by class nbsp; ActiveRecord { nbsp; nbs database instantiation operation code optimization, core classes are streamlined ......
This post was last edited by xjl756213616 on 16:59:50
classActiveRecord{public$table;public$data;public$obj;publicfunction__construct($table){$this->t
It's not surprising when those of us who use rails see things like 5.weeks.from_nowor3.days.ago + 2.hours. Also, PostgreSQL can do this by simply calling PostgreSQL built-in functions to achieve the same functionality.Current time/date/time stamp
There are a number of ways to get the current time, and before that we need to know the following two types of differences:
Always returns the current value (Clock_timestamp ())
Always returns the
Several types of database fields that are easy to remember and confusing are always incorrect. Here, take notes:
A Chinese Character occupies two bytes.Char (n) contains n characters, n/2 Chinese characters (up to 4000 Chinese characters)N must be a value between 1 and 8,000. The storage size is n Bytes.Nchar (n) contains n characters and n Chinese characters (up to 4000 Chinese characters can be entered)T
Third, indexIn the previous chapter we learned to use explain to generate a query execution plan (QEP) to find the problem with the statement. Of the results returned by explain, three are index-related (possible key, key, extra), and the visible index has a prominent position in improving query efficiency.In this chapter, we will explain in all directions how to use the index to optimize our database.1. Role of the IndexThe principle of indexing is t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.