????MySQL
????mysql??????????????????
????1?????дSQL???????LR???????ж?????????
????2????????????????洢??????????????????????У???????????м???????????????
????????????μ????????
1 BEGIN
2     -- DECLARE ???????????????
3     DECLARE i INT DEFAULT 1;
4     DECLARE p_sex VARCHAR(10);
5     DECLARE p_course VARCHAR(10);
6     -- WHILE???????DO???????END WHILE????
7     WHILE i<10000
8         DO
9         -- IF???????THEN???????END IF????
10         IF i%2=0 THEN
11             SET p_sex = 'M';
12             SET p_course = 'Math';
13         ELSE
14             SET p_sex = 'W';
15             SET p_course = 'Music';
16         END IF;
17         -- CONCAT(str1??str2??...)??????????
18         -- RAND()????????????????(0??1)??С??
19         -- FLOOR()?????????????
20         INSERT INTO teacher (cardNO??name??sex??age??course??created??modified) VALUES(i+1000000??CONCAT('teacher_'??FLOOR(RAND()*10000))??p_sex??FLOOR(20+RAND()*10)??p_course??NOW()??NOW());
21         SET i = i+1;
22     END WHILE;
23 END
????Redis
????redis????????????mysql??????????Щ??
???????巽?????£?
????1??????jedis-2.1.0.jar??????eclipseд????????????
????2????д????????LR???в???????
????????redis???????????£?
1 package com.redis;
2
3 import redis.clients.jedis.Jedis;
4
5 public class redistest {
6
7     public static void main(String[] args){
8         Jedis jedis = new Jedis("192.168.1.x"??6379);//????redis?????????LR??int????
9
10         jedis.set("hankai"?? "123456");//?????????????????????LR?н??в???????
11         System.out.println("ok");
12     }
13 }
???????????????????????????????????????????????????redis??dbsize????????