之后的内容只能追加,不可以修改,删除。
1. mysql可以对字段进行MD5加密,
加密插入:INSERT INTO t_user(id,username,PASSWORD) VALUES('5','pecool',MD5('pecool123'));
加密查询:SELECT * FROM t_user WHERE PASSWORD=MD5('pecool123');
MD5网传无法解密,因为其算法是单向。
2.分别在oracle、java的jdbc中设置隔离级别
2.1 oracle中:https://docs.oracle.com/cloud/latest/db121/LNPLS/static.htm#LNPLS99975 中搜《SET TRANSACTION Statement》
DECLARE daily_order_total ,); weekly_order_total ,); monthly_order_total ,); BEGIN COMMIT; -- end previous transaction SET TRANSACTION READ ONLY NAME 'Calculate Order Totals'; SELECT SUM (order_total) INTO daily_order_total FROM orders WHERE order_date = SYSDATE; SELECT SUM (order_total) INTO weekly_order_total FROM orders ; SELECT SUM (order_total) INTO monthly_order_total FROM orders ; COMMIT; -- ends read-only transaction END; /
2.2jdbc里:Connection类对四种隔离级别进行了常量设置
connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);