Whether in a small, free database space or a large e-commerce site, a reasonable design of the table structure, the full use of space is very necessary. This requires us to have a good understanding of the common data types of database systems. Below I will write a little of my experience to share with you.
One, the number type
The number
):Decimal (m,d) fixed-point type floating-point types hold approximate values in the database, while fixed-point types hold exact values in the database. The parameter m is the maximum number (precision) of a fixed-point type number with a range of 0~65,d digits to the right of the decimal point and a range of 0~30, bu
Char, varchar, nchar, and nvarchar differences for string fields in the program, SQLServer has char, varchar, nchar, and nvarchar types to match (text and ntext are not considered for the time being ), during database creation, these four types are often vague. Here is a comparison. Fixed Length or variable length: the so-called fixed length is fixed length
Char,
{
//control the upload file type
if(($_files["File2"] ["Type"]== "Application/octet-stream" | |$_files["File2"] ["Type"]== "FLV/QSV") $_files["File2"] ["Size"])
{
//Locate the location where the file is stored
$file 2name= "./file/".Date("Ymdhis").$_files["File2"] ["Name"];//added. Splicing//Conversion encoding format
$file 2name=Iconv("UTF-8", "gb2312",$file 2name); //determine if a file exists
if(file_exists($file 2name))
{
Echo"
choiceSummarize:Use GUIDs. There is no duplication problem, and data merging is very simple. The association speed is slower than int. It is best to use this scenario for frequently merging data or offline input data online uploads.The GUID value is random and does not accept any form that can be more meaningful to the user. There is no way to determine the order in which the GUID values are generated, so it is not suitable for existing applications that increment index key values in the loop o
There are usually many data types in the database and different classification methods. For example, the most common numeric, numeric, and datetime types are also uncommon Boolean, enumeration, and set types. To support a specific data type (such as the simplest INTEGER) in DBMS, we can consider the following aspects.
, with a decimal point followed by 307 zeros. The storage space occupied by float and double types is 4 bytes and 8 bytes respectively. If you need to use decimal fields, the precision is not high, of course, float is used! But to be honest, how does our "Civil" data require high accuracy? I have never used these two types so far-I have not encountered any examples that are suitable for using them.
The mos
The data types and sizes in the database store are different. Some places store only numeric types, some store only text types, and some both. Many databases support a variety of specialized types: date and time types, binary char
When creating a table from Django's ORM, we need to define our own classes. When defining a class, he has a wide variety of field types, each with its own parameters to configure, and a simple summary below.First look at the type of field. Although Python offers nearly 20 types, after he transforms into a database table, it is essentially 4
SPL
3.0 officially released,
Litre
Level description
After a period of modification,SPL Finally rose3.0 To be promoted3.0 , Mainly because two connection methods are added:ODP. net AndODBC
ODP. net Greatly enhancedSPL PairOracle Database access capability, currently usedODP. net ConnectionOracle Is the best choice, relatedArticleYou can find it on the Internet. There are quite a few.
ODBCYes. Net framewo
will never catch up with the speed of File System Processing
Database Backup has become huge and time-consuming
Access to files must go through your application layer and database layer.
The last two are real killers. Store thumbnail images in the database? Well, you can't use nginx or other types of lightweight se
Database type of column: Currently, there are only 2 kinds of types: int, char Column type:1. Number types2. String type3. Date typeInteger type in number type:Tinyint of 1 bytes -128~127SmallInt of 2 bytes -32768~32767Mediumint of 3 bytes-8388608 ~ 8388607int accounted for 4 bytes -2147483648~2147483647BigInt occupies 8 bytes anyway the range is larger than int.How do you choose these integer
can be divided into three types:
§ Offline backup
§ Backup and Log Retention
§ Logical backup
Offline backup
Only create database backup. Simple backup is suitable for read-only databases or databases filled with batch jobs that can be easily re-created, or databases that do not need to be maintained between backups.
Data loss: all changes made after the last backup operation will be lost. This type of rec
The description of the DB2 database driver type is the main content of this article. At the same time, this article also describes the early CLI-based Drivers, recent pure Java drivers, and the combination of CLI and Java. for a specific DB2 version, the driver has a specific driver and a general driver, which is obvious.
General description
In the database product line of IBM, there are many data access
H2 database functions and data types
I. Common H2 Database Data Types
INT type: corresponding to java. lang. Integer
REAL Type: corresponding to java. lang. Float
DOUBLE Type: corresponding to java. lang. Double
DECIMAL type: corresponding to java. math. BigDecimal, such as DECIMAL (20, 2)
CHAR type: corresponding to j
Oracle Common database field typesCommon database field types are as follows: Field type Chinese description restrictions other description CHAR fixed length string max length bytes VARCHAR2 variable length string maximum length 4000 bytes can do index maximum length 749 NCHAR by character Set fixed length string maximum length bytes NVARCHAR2 variable length str
Label:Data type of database: integer: Int,smallint,bigint,decimal real type: float,real. String type:Char/nchar,Varchar/nvarchar. 1. There is no difference between VAR: a variable-length string type with Var, and a fixed length string without var. Fixed-Length field, if the stored data does not reach the maximum length, the system will fill the string behind the input space. When the recorded data has a fixed length, the selected length (Char/nchar) i
The database engine you can use depends on how mysql is compiled during installation. To add a new engine, you must recompile MYSQL. By default,MYSQL supports three engines: ISAM, MYISAM, and HEAP..The other two types of INNODB and BERKLEY (BDB) are also frequently used.ISAMISAM is a well-defined and time-tested data table management method. It is designed to take into account that the number of
result of the "leftmost prefix". The simple understanding is only from the left to the beginning of the combination. Not as long as the combined index is used for queries that contain these three columns, the following SQL uses this combined MySQL database index:SELECT * FROM MyTable whree username= "admin" and city= "Zhengzhou" select * FROM MyTable whree username= "admin" and the next few will not be used:SELECT * FROM MyTable whree age=20 and city
most widely used are Sybase 10 and syabse for SCO Unix.Features of the Sybase database:(1) It is a database based on the client/server architecture.(2) It is a truly open database.(3) It is a high-performance database.5.db2DB2 is a database management system embedded in IBM
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.