最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Mysql實(shí)戰(zhàn)練習(xí)之簡(jiǎn)單圖書管理系統(tǒng)

 更新時(shí)間:2021年09月26日 08:59:02   作者:信仰xinyang  
由于課設(shè)需要做這個(gè),于是就抽了點(diǎn)閑余時(shí)間,寫了下,用Mysql與Java,基本全部都涉及到,包括借書/還書,以及書籍信息的更新,查看所有的書籍。需要的朋友可以參考下

一、梳理功能

1.能夠表示書籍信息,針對(duì)每本書來(lái)說(shuō),序號(hào),書名,作者,價(jià)格,類型。
2.能夠表示用戶信息,普通用戶,管理員。
3.支持的操作:

  • 對(duì)于普通用戶:查看書籍列表,查詢指定書籍,借書還書。
  • 對(duì)于 管理員:查看書籍列表,新增刪除書籍。

在這里插入圖片描述

二、準(zhǔn)備數(shù)據(jù)庫(kù)

創(chuàng)建用戶表和書籍表

create database if not exists java100_bookmanager;
use java100_bookmanager;
drop table if exists book;
//設(shè)置id為自增主鍵
create table book(id int primary  key auto_increment,name varchar(20),author varchar(20),price int,type varchar(20),isBorrowed int);

drop table if exists user;
//同樣設(shè)置 userid為自增主鍵并且用戶名字不重復(fù)
create table user(
    userId int primary key auto_increment,
    username varchar(20) unique,
    password varchar(20),
    isAdmin int
);
-- 插入一些書籍
insert into book values(null,'西游記','吳承恩',10000,'古典小說(shuō)',0);
insert into book values(null,'三國(guó)演義','羅貫中',10000,'古典小說(shuō)',0);
insert into book values(null,'水滸傳','施耐庵',10000,'古典小說(shuō)',0);
insert into book values(null,'金瓶梅','蘭陵笑笑生',10000,'古典小說(shuō)',0);
--插入一些用戶
insert into user values(null,'admin','123',1);
insert into user values(null,'zhangsan','123',0);

三、構(gòu)造和數(shù)據(jù)庫(kù)相關(guān)的實(shí)體類

書籍

public class Books {
    private int bookId;//書籍編號(hào)
    private String name;//書名
    private String author;//作者
    private int price;//價(jià)格
    private String type;//類型
    private boolean isBorrowed;//是否被借閱
    //set get方法

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookId=" + bookId +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", isBorrowed=" + isBorrowed +
                '}';
    }

用戶

有兩種用戶,一種為普通用戶,另一種為管理員,管理員和普通用戶看到的menu不同,管理員和普通 用戶的類方法也不同
先定義一個(gè)抽象類User 讓普通用戶NoramlUser和管理員類Admin來(lái)繼承User類

abstract public class user {
    private int userId;
    private String userName;
    private String passWord;

    IOperation[] operations;//方法數(shù)組,表示user類所包含的方法
    abstract int menu();//子類要重寫menu方法,因?yàn)閮蓚€(gè)子類看到的menu不同
    public void doOperation(int choice){//此方法來(lái)執(zhí)行一些操作,如借書還書等
        operations[choice].work();
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    @Override
    public String toString() {
        return "user{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                '}';
    }
}

NormalUser類

public class NormalUser extends user{
    public NormalUser(){
        this.operations=new IOperation[]{//之后單獨(dú)開辟一個(gè)包,包里存儲(chǔ)和實(shí)現(xiàn)這些方法
                new ExitOperation(),//退出系統(tǒng)
                new DisplayOperation(),//查看書籍列表
                new FindOperation(),//查找書籍
                new BorrowOperation(),//借閱書籍
                new ReturnOperation(),//還書
        };
    }
    @Override
    public int menu() {//重寫父類menu方法
        System.out.println("========================");
        System.out.println("歡迎您,"+this.getUserName()+"!");
        System.out.println("1.查看書籍列表");
        System.out.println("2.查找指定書籍");
        System.out.println("3.借閱書籍");
        System.out.println("4.歸還書籍");
        System.out.println("0.退出系統(tǒng)");
        System.out.println("========================");
        System.out.println("請(qǐng)輸入選項(xiàng)");
        Scanner sc=new Scanner(System.in);
        int choice=sc.nextInt();
        return choice;
    }
}

Admin類

public class Admin extends user {
    public Admin(){
        this.operations=new IOperation[]{
                new ExitOperation(),//退出系統(tǒng)
                new DisplayOperation(),//查看書籍列表
                new FindOperation(),//查找書籍
                new AddOperation(),//添加書籍
                new DelOperation(),//刪除書籍
        };
    }
    @Override
    public int menu() {
        System.out.println("========================");
        System.out.println("歡迎您,"+this.getUserName()+"您是管理員!");
        System.out.println("1.查看書籍列表");
        System.out.println("2.查找指定書籍");
        System.out.println("3.新增書籍");
        System.out.println("4.刪除書籍");
        System.out.println("0.退出系統(tǒng)");
        System.out.println("========================");
        System.out.println("請(qǐng)輸入選項(xiàng)");
        Scanner sc=new Scanner(System.in);
        int choice=sc.nextInt();
        return choice;
    }
}

四、封裝數(shù)據(jù)庫(kù)相關(guān)操作

  • 1.先把數(shù)據(jù)庫(kù)鏈接的操作封裝好
  • 2.再把針對(duì)書籍表的增刪查改操作封裝好
  • 3.再把針對(duì)用戶表的操作封裝好

數(shù)據(jù)庫(kù)鏈接操作

//在這里封裝數(shù)據(jù)庫(kù)的連接操作
public class DBUtil {
//設(shè)置url 賬號(hào)密碼 根據(jù)個(gè)人設(shè)置
    private static final String URL="jdbc:mysql://127.0.0.1:3306/java100_bookmanager?characterEncoding=utf8&&useSSL=false";
    private static final String USERNAME="root";
    private static final String PASSWORD="q986681563";
    //餓漢模式
    //類加載階段就會(huì)調(diào)用靜態(tài)代碼塊進(jìn)行實(shí)例化
    /*private static DataSource dataSource=new MysqlDataSource();

    static{
        ((MysqlDataSource)dataSource).setUrl(URL);
        ((MysqlDataSource)dataSource).setUser(USERNAME);
        ((MysqlDataSource)dataSource).setPassword(PASSWORD);
    }*/
    //懶漢模式
    //只有首次調(diào)用getDataSource方法 才會(huì)實(shí)例化
    private static DataSource dataSource=null;
    public static DataSource getDataSource(){
        if(dataSource==null){
            dataSource=new MysqlDataSource();
            ((MysqlDataSource)dataSource).setUrl(URL);
            ((MysqlDataSource)dataSource).setUser(USERNAME);
            ((MysqlDataSource)dataSource).setPassword(PASSWORD);
        }
        return dataSource;
    }
    public static Connection getConnection() throws SQLException {
        return getDataSource().getConnection();
    }
    public static void close(ResultSet resultSet, PreparedStatement statement,Connection connection){//釋放資源
    //注釋掉的方式更安全
        /*if(resultSet!=null){
            try {
                resultSet.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        if(statement!=null){
            try {
                statement.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        if(connection!=null){
            try {
                connection.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }*/
        try {
            if(resultSet!=null) resultSet.close();
            if(statement!=null) statement.close();
            if(connection!=null) connection.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

針對(duì)書籍表操作

//DAO Data Access Object 數(shù)據(jù)訪問對(duì)象
public class BookDAO {
    //1.新增書籍
    public boolean add(Books book){
        Connection connection=null;
        PreparedStatement statement=null;
        try {
            connection= DBUtil.getConnection();
            String sql="insert into book values(null,?,?,?,?,?)";
            statement=connection.prepareStatement(sql);
            statement.setString(1,book.getName());
            statement.setString(2,book.getAuthor());
            statement.setInt(3,book.getPrice());
            statement.setString(4,book.getType());
            statement.setInt(5,book.isBorrowed()?1:0);
            int ret=statement.executeUpdate();
            if(ret!=1) return false;
            return true;
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.close(null,statement,connection);
        }
        return false;
    }
    //2.查看所有書籍
    public List<Books> selectAll(){
        List<Books> list=new ArrayList<>();
        Connection connection=null;
        PreparedStatement statement=null;
        ResultSet resultSet=null;
        try {
            connection=DBUtil.getConnection();
            String sql="select*from book";
            statement=connection.prepareStatement(sql);
            resultSet=statement.executeQuery();
            while(resultSet.next()){
                Books book=new Books();
                book.setBookId(resultSet.getInt("id"));
                book.setName(resultSet.getString("name"));
                book.setAuthor(resultSet.getString("author"));
                book.setPrice(resultSet.getInt("price"));
                book.setType(resultSet.getString("type"));
                book.setBorrowed(resultSet.getInt("isBorrowed")==1);
                list.add(book);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.close(resultSet,statement,connection);
        }
        return list;
    }
    //3.根據(jù)名字找書籍
    public List<Books> selectByName(String name) {
        List<Books> list=new ArrayList<>();
        Connection connection=null;
        PreparedStatement statement=null;
        ResultSet resultSet=null;
        try {
            connection=DBUtil.getConnection();
            String sql="select* from book where name=?";
            statement=connection.prepareStatement(sql);
            statement.setString(1,name);
            resultSet=statement.executeQuery();
            while(resultSet.next()){
                Books book=new Books();
                book.setBookId(resultSet.getInt("Id"));
                book.setName(resultSet.getString("name"));
                book.setAuthor(resultSet.getString("author"));
                book.setType(resultSet.getString("type"));
                book.setPrice(resultSet.getInt("price"));
                book.setBorrowed(resultSet.getInt("isBorrowed")==1);
                list.add(book);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.close(resultSet,statement,connection);
        }
        return list;
    }
    //4.刪除書籍
    public boolean delete(int bookId){
        Connection connection=null;
        PreparedStatement statement=null;
        try {
            connection=DBUtil.getConnection();
            String sql="delete from book where id=?";
            statement=connection.prepareStatement(sql);
            statement.setInt(1,bookId);
            int ret=statement.executeUpdate();
            if(ret!=1) return false;
            return true;
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.close(null,statement,connection);
        }
        return false;
    }
    //5.借書
    public boolean borrowBook(int bookId){
        Connection connection=null;
        PreparedStatement statement=null;
        PreparedStatement statement2=null;
        ResultSet resultSet=null;
        try {
            connection=DBUtil.getConnection();
            String sql="select * from book where id=?";
            statement=connection.prepareStatement(sql);
            statement.setInt(1,bookId);
            resultSet=statement.executeQuery();
            if(resultSet.next()){
                boolean isBorrowed=(resultSet.getInt("isBorrowed")==1);
                if(isBorrowed){
                    System.out.println("書已借出,無(wú)法再次借出! bookId="+bookId);
                    return false;
                }
            }else{
                System.out.println("書不存在 bookId="+bookId);
                return false;
            }
            sql="update book set isBorrowed=1 where id=?";
            statement2=connection.prepareStatement(sql);
            statement2.setInt(1,bookId);
            int ret = statement2.executeUpdate();
            if(ret!=1) {
                System.out.println("借閱失敗");
                return false;
            }
            System.out.println("借閱成功");
            return true;
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            if(resultSet!=null) {
                try {
                    connection.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(statement!=null) {
                try {
                    statement.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(statement2!=null) {
                try {
                    statement2.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(connection!=null){
                try {
                    connection.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
        }
        return false;
    }
    //6.歸還
    public boolean returnBook(int bookId){
        Connection connection=null;
        PreparedStatement statement=null;
        PreparedStatement statement2=null;
        ResultSet resultSet=null;
        try {
            connection=DBUtil.getConnection();
            String sql="select* from book where id=?";
            statement=connection.prepareStatement(sql);
            statement.setInt(1,bookId);
            resultSet= statement.executeQuery();
            if(resultSet.next()){
                boolean isBorrowed=(resultSet.getInt("isBorrowed")==1);
                if(!isBorrowed){
                    System.out.println("書沒有被借出,不需要?dú)w還 bookId="+bookId);
                    return false;
                }
            }else{
                System.out.println("沒有該書! bookId="+bookId);
                return false;
            }
            sql="update book set isBorrowed=0 where id=?";
            statement2=connection.prepareStatement(sql);
            statement2.setInt(1,bookId);
            int ret = statement2.executeUpdate();
            if(ret!=1) return false;
            return true;
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            if(resultSet!=null) {
                try {
                    connection.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(statement!=null) {
                try {
                    statement.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(statement2!=null) {
                try {
                    statement2.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
            if(connection!=null){
                try {
                    connection.close();
                } catch (SQLException throwables) {
                    throwables.printStackTrace();
                }
            }
        }
        return false;
        }
    }
   

在這里插入圖片描述

針對(duì)用戶表的操作

public class UserDao {
    //根據(jù)用戶名找密碼的邏輯
    //username是unique約束的
    public user selectByName(String name){
        Connection connection=null;
        PreparedStatement statement=null;
        ResultSet resultSet=null;
        try {
            connection=DBUtil.getConnection();
            String sql="select* from user where username=?";
            statement=connection.prepareStatement(sql);
            statement.setString(1,name);
            resultSet = statement.executeQuery();
            if(resultSet.next()){
                boolean isAdmin=(resultSet.getInt("isAdmin")==1);
                user users=null;
                if(isAdmin){
                    users=new Admin();
                }else users=new NormalUser();
                users.setPassWord(resultSet.getString("password"));
                users.setUserId(resultSet.getInt("userId"));
                users.setUserName(resultSet.getString("username"));
                return users;
            }

        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.close(resultSet,statement,connection);
        }
        return null;
    }
}

編寫主邏輯(main方法和login方法)

public class Main {
    public static void main(String[] args) {
        user users=login();
        while(true){
            int choice=users.menu();
            users.doOperation(choice);
        }
    }
    private static user login(){
        Scanner sc=new Scanner(System.in);
        System.out.println("請(qǐng)輸入用戶名");
        String name=sc.next();
        System.out.println("請(qǐng)輸入密碼");
        String password=sc.next();
        UserDao userDao=new UserDao();
        user users=userDao.selectByName(name);
        if(users==null){
            System.out.println("登陸失敗!");
            System.exit(0);
        }
        if(!users.getPassWord().equals(password)){
            System.out.println("密碼錯(cuò)誤");
            System.exit(0);
        }
        return users;
    }
}

編寫operation各種細(xì)節(jié)

將所有operations操作放在一個(gè)包中,定義一個(gè)接口operations,所有操作實(shí)現(xiàn)這個(gè)接口并重寫方法
IOperation接口

public interface IOperation {
    void work();
}

添加書籍操作

public class AddOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("新增書籍!");
        Scanner sc=new Scanner(System.in);
        System.out.println("請(qǐng)輸入書名");
        String name=sc.next();
        System.out.println("請(qǐng)輸入作者");
        String author=sc.next();
        System.out.println("請(qǐng)輸入價(jià)格");
        int price=sc.nextInt();
        System.out.println("請(qǐng)輸入類別");
        String type=sc.next();
        Books book=new Books();
        book.setName(name);
        book.setPrice(price);
        book.setType(type);
        book.setAuthor(author);
        BookDAO bookDAO=new BookDAO();
        boolean ret=bookDAO.add(book);
        if(ret) System.out.println("新增成功");
        else System.out.println("新增失敗");
    }
}

借書操作

public class BorrowOperation implements IOperation {
    @Override
    public void work() {
        System.out.println("借閱書籍");
        System.out.println("請(qǐng)輸入要借閱的書籍id");
        Scanner sc=new Scanner(System.in);
        int id=sc.nextInt();
        BookDAO bookDAO=new BookDAO();
        boolean ret = bookDAO.borrowBook(id);
    }
}

刪除書籍操作

public class DelOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("刪除書籍!");
        Scanner sc=new Scanner(System.in);
        System.out.println("請(qǐng)輸入刪除書籍的id");
        int id=sc.nextInt();
        BookDAO bookDAO=new BookDAO();
        boolean ret = bookDAO.delete(id);
        if(ret) System.out.println("刪除成功");
        else System.out.println("刪除失敗");
    }
}

查看書籍列表操作

public class DisplayOperation implements IOperation {
    @Override
    public void work() {
        System.out.println("展示所有書籍");
        BookDAO bookdao=new BookDAO();
        List<Books> list=bookdao.selectAll();
        for(Books book:list){
            System.out.println(book);
        }
        System.out.println("展示書籍完畢");
    }
}

退出系統(tǒng)操作

public class ExitOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("退出程序");
        System.exit(0);
    }
}

查找書籍操作

public class FindOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("根據(jù)名字查找書籍");
        System.out.println("請(qǐng)輸入書名");
        Scanner sc=new Scanner(System.in);
        String name=sc.next();
        BookDAO bookDAO=new BookDAO();
        List<Books> books = bookDAO.selectByName(name);
        for(Books book:books){
            System.out.println(book);
        }
        System.out.println("根據(jù)名字查找書籍完畢");
    }
}

還書操作

public class ReturnOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("歸還書籍!");
        System.out.println("請(qǐng)輸入要?dú)w還的書籍的id");
        Scanner sc=new Scanner(System.in);
        int id=sc.nextInt();
        BookDAO bookDAO=new BookDAO();
        boolean ret = bookDAO.returnBook(id);
        if(ret){
            System.out.println("歸還成功");
        }else{
            System.out.println("歸還失敗");
        }
    }
}

總結(jié):簡(jiǎn)單的圖書管理系統(tǒng),通過練習(xí)掌握簡(jiǎn)單JDBC語(yǔ)法和API,同時(shí)可以幫助理解java中多態(tài)繼承等概念。

到此這篇關(guān)于Mysql實(shí)戰(zhàn)練習(xí)之簡(jiǎn)單圖書管理系統(tǒng)的文章就介紹到這了,更多相關(guān)Mysql 圖書管理系統(tǒng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • MySQL如何查看元數(shù)據(jù)鎖阻塞在哪里

    MySQL如何查看元數(shù)據(jù)鎖阻塞在哪里

    這篇文章主要介紹了MySQL如何查看元數(shù)據(jù)鎖阻塞在什么地方的相關(guān)資料,希望通過本文能幫助到大家,讓大家實(shí)現(xiàn)這樣的功能,需要的朋友可以參考下
    2017-10-10
  • mysql千萬(wàn)級(jí)數(shù)據(jù)分頁(yè)查詢性能優(yōu)化

    mysql千萬(wàn)級(jí)數(shù)據(jù)分頁(yè)查詢性能優(yōu)化

    本文給大家分享的是作者在使用mysql進(jìn)行千萬(wàn)級(jí)數(shù)據(jù)量分頁(yè)查詢的時(shí)候進(jìn)行性能優(yōu)化的方法,非常不錯(cuò)的一篇文章,對(duì)我們學(xué)習(xí)mysql性能優(yōu)化非常有幫助
    2017-11-11
  • Mysql中存儲(chǔ)引擎的區(qū)別及比較

    Mysql中存儲(chǔ)引擎的區(qū)別及比較

    這篇文章主要介紹了Mysql中存儲(chǔ)引擎的區(qū)別及比較,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-06-06
  • 如何選擇合適的MySQL日期時(shí)間類型來(lái)存儲(chǔ)你的時(shí)間

    如何選擇合適的MySQL日期時(shí)間類型來(lái)存儲(chǔ)你的時(shí)間

    這篇文章主要介紹了如何選擇合適的MySQL日期時(shí)間類型來(lái)存儲(chǔ)你的時(shí)間,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來(lái)看看吧
    2020-08-08
  • mysql合并多條記錄的單個(gè)字段去一條記錄編輯

    mysql合并多條記錄的單個(gè)字段去一條記錄編輯

    mysql怎么合并多條記錄的單個(gè)字段去一條記錄,今天在網(wǎng)上找了一下,方法如下
    2011-09-09
  • 淺談MySQL數(shù)據(jù)同步到 Redis 緩存的幾種方法

    淺談MySQL數(shù)據(jù)同步到 Redis 緩存的幾種方法

    本文主要介紹了淺談MySQL數(shù)據(jù)同步到 Redis 緩存的幾種方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-03-03
  • 淺析MySQL的lru鏈表

    淺析MySQL的lru鏈表

    這篇文章主要介紹了MySQL lru鏈表的相關(guān)資料,幫助大家更好的理解和使用MySQL數(shù)據(jù)庫(kù),感興趣的朋友可以了解下
    2020-11-11
  • MySQL如何給查詢結(jié)果添加行號(hào)

    MySQL如何給查詢結(jié)果添加行號(hào)

    這篇文章主要介紹了MySQL如何給查詢結(jié)果添加行號(hào)的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-07-07
  • mysql跨服務(wù)查詢之FEDERATED存儲(chǔ)引擎的實(shí)現(xiàn)

    mysql跨服務(wù)查詢之FEDERATED存儲(chǔ)引擎的實(shí)現(xiàn)

    本文主要介紹了mysql跨服務(wù)查詢之FEDERATED存儲(chǔ)引擎的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-01-01
  • MySQL大量臟數(shù)據(jù)如何只保留最新的一條(最新推薦)

    MySQL大量臟數(shù)據(jù)如何只保留最新的一條(最新推薦)

    這篇文章主要介紹了MySQL大量臟數(shù)據(jù),如何只保留最新的一條,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-04-04

最新評(píng)論

全南县| 潮安县| 鄯善县| 肃北| 海宁市| 丰城市| 营山县| 民丰县| 乌鲁木齐县| 崇州市| 鄯善县| 宜都市| 荥经县| 都昌县| 汉川市| 内丘县| 扎赉特旗| 涟水县| 策勒县| 古浪县| 松阳县| 民丰县| 鄂伦春自治旗| 会东县| 和政县| 长顺县| 台中市| 南召县| 临夏市| 田阳县| 北流市| 洛南县| 武汉市| 莱州市| 金山区| 南宫市| 汤原县| 垣曲县| 弥勒县| 嘉祥县| 合山市|