Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚmysqlµÄ¾Û¼¯Ë÷Òý

·­Ò룺
InnoDB±í»á°üº¬Ò»¸ö¾Û¼¯Ë÷Òý£¨Êý¾Ý±íµÄÎïÀí´æ´¢Ë³ÐòºÍ±íµÄÂß¼­´æ´¢Ë³ÐòÒ»Ö£©
Ò»°ãÊǰ´ÕÕÏÂÃæµÄ¹æÔòÀ´É趨¾Û¼¯Ë÷ÒýµÄ£º
1£¬¼ÙÈç±í°üº¬PRIMARY KEY£¬InnoDBʹÓÃËü×÷Ϊ¾Û¼¯Ë÷Òý
2£¬¼ÙÈç±íûÓж¨ÒåPRIMARY KEY£¬InnoDB½«µÚÒ»¸öÖ»°üº¬NOT NULLÊôÐÔÁеÄUNIQUE index×÷ΪÖ÷¼ü²¢ÇÒ½«ËüÉèÖÃΪ¾Û¼¯Ë÷Òý
3£¬Ç°Á½Õß¶¼²»Âú×ãµÄʱºò£¬mysql¾ÍÔö¼ÓÒ»¸öÒþ²ØµÄautocreament
Every InnoDB
table has a special index called
the clustered index
where the data for
the rows is stored:

If you define a PRIMARY KEY
on your
table, InnoDB
uses it as the clustered
index.

If you do not define a PRIMARY KEY
for
your table, MySQL picks the first UNIQUE
index that has only NOT NULL
columns as
the primary key and InnoDB
uses it as the
clustered index.

If the table has no PRIMARY KEY
or
suitable UNIQUE
index,
InnoDB
internally generates a hidden
clustered index on a synthetic column containing row ID
values. The rows are ordered by the ID that
InnoDB
assigns to the rows in such a
table. The row ID is a 6-byte field that increases
monotonically as new rows are inserted. Thus, the rows
ordered by the row ID are physically in insertion order.

Accessing a row through the clustered index is fast because the
row data is on the same page where the index search leads. If a
table is large, the clustered index architecture often saves a
disk I/O operation when compared to storage organizations that
store row data using a different page from the index record.
(For example, MyISAM
uses one file for data
rows and another for index records.)

In InnoDB
, the records in nonclustered
indexes (also called secondary indexes) contain the primary ke


Ïà¹ØÎĵµ£º

asp.netÁ¬½ÓmysqlµÄÎÊÌâ

Ò»£ºasp.netÔõôÁ¬½ÓmysqlÊý¾Ý¿â
   ÏÂÔØmysql connectionµÄ¶«Î÷
   http://dev.mysql.com/downloads/connector/net/6.2.html
   ÓÐ3¸ödownloadÑ¡µÚÒ»¸öÏÂÔØ
   Windows (x86, 32-bit), ZIP Archive 
   mysql-connector-net-6.2.2-noinstall.zip ......

Java °ÑÎı¾ÖеÄÊý¾Ý²åÈëµ½MySqlÊý¾Ý¿â

Ò»¹²ÓÐÈý¸öÀࣺWriteFile ; ReadFile ; InsertDB ;
//WriteFile.java
//ÓÃÓÚ½«ÐÅϢдÈëÎı¾Îļþ
package org.mb.insertfromfile;
import java.io.*;
public class WriteFile{
private int count = 0 ;
public int getCount() {
return count;
}
public void setCount(int count) {
this.cou ......

MySQLµÄdatetimeÉèÖõ±Ç°Ê±¼äΪĬÈÏÖµ


MySQLµÄdatetimeÉèÖõ±Ç°Ê±¼äΪĬÈÏÖµ 
ÓÉÓÚMySQLĿǰ×ֶεÄĬÈÏÖµ²»Ö§³Öº¯Êý£¬ËùÒÔÓÃ
create_time datetime default now()
µÄÐÎʽÉèÖÃĬÈÏÖµÊDz»¿ÉÄܵġ£
´úÌæµÄ·½°¸ÊÇʹÓÃTIMESTAMPÀàÐÍ´úÌæDATETIMEÀàÐÍ¡£
CURRENT_TIMESTAMP £ºµ±ÎÒ¸üÐÂÕâÌõ¼Ç¼µÄʱºò£¬ÕâÌõ¼Ç¼µÄÕâ¸ö×ֶβ»»á¸Ä±ä
¡£
CURRENT_TIMESTAMP O ......

C#Á¬½ÓMySQL½øÐвÙ×÷µÄ·½·¨

ÓÉÓÚÐèҪʵÏÖÒÔϹ¦ÄÜ£º
Íø¹ØÍ¨¹ý´®¿Ú·¢ËÍÊý¾Ý¸øPC»ú£¬PC»úÊÕ¼¯Êý¾Ý²¢½âÎö±£´æµ½MySQLÖУ¬È»ºóJSPÒ³Ãæ¶ÁÈ¡MySQLÖеÄÊý¾Ý²¢ÏÔʾ¡£
ËùÒÔÀûÓÃC#Á¬½ÓMySQLÊý¾Ý³ÉΪÁ˱ØÐëÒª¾­¹ýµÄ¹ý³Ì£¬Ôڴ˸øÓèÏêϸµÄ˵Ã÷¡£
1¡¢ÏÂÔØÐèÒªµÄÎļþMySQLDriverCS£¬ÏÂÔØµØÖ·Îª£ºhttp://sourceforge.net/projects/mysqldrivercs
2¡¢°²×°Îļþ£ºMySQ ......

MS SQL ServerºÍMySQLÇø±ð

      1 MySQLÖ§³Öenum,ºÍsetÀàÐÍ£¬SQL Server²»Ö§³Ö
¡¡¡¡2 MySQL²»Ö§³Önchar,nvarchar,ntextÀàÐÍ
¡¡¡¡3 MySQLµÄµÝÔöÓï¾äÊÇAUTO_INCREMENT£¬¶øMS SQLÊÇidentity(1,1)
¡¡¡¡4 MS SQLĬÈϵ½´¦±í´´½¨Óï¾äµÄĬÈÏÖµ±íʾÊÇ((0)),¶øÔÚMySQLÀïÃæÊDz»ÔÊÐí´øÁ½À¨ºÅµÄ
¡¡¡¡5 MySQLÐèҪΪ±íÖ¸¶¨´æ´¢ÀàÐÍ
¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ