tailieunhanh - My SQL and Java Developer’s Guide phần 8

và hữu ích được tìm thấy trong các đối tượng DatabaseMetaData. Đối với một danh sách đầy đủ, tham khảo Phụ lục C. Nhiều người trong số các phương pháp cho phép đối số để xác định cơ sở dữ liệu và bảng biểu các phương pháp nên trả lại thông tin từ. Trong những trường hợp này, bạn có thể sử dụng chuỗi tên đầy đủ của bảng, | The Insert Row Task 285 String value valueFields i .getText if 0 continue if isFirst else isFirst false columnNames i .append value .append return private String columnNames private JTextField valueFields private final static int FIELD_COLS 20 Listing The insert row task delegate. continued Figure The insert row task prompt frame. L286 What s Next Building a General Interface for MySQL In this chapter we detailed the development of a real-world application for accessing MySQL databases using the Java programming language. Okay maybe calling it a real-world application is going a bit far. There is a distinct lack of bells and whistles error checking is minimal and we have taken a few shortcuts. However the example does provide some insight into ways in which Java and MySQL can combine to address real-world problems. In the next chapter we turn our attention to the topic of database administration. Database Administration MySQL is a comprehensive relational database management system and must be managed to achieve optimal functionality. Some of the issues that you need to understand include how to add users and set up permissions how to import large amounts of data into various tables when and how to make backups and how to replicate data among other functions. This chapter provides you with a guide to database administration in a development or staging environment. For a production-level system we recommend that you use a professional database administrator. Using the mysql Administration Application One of the most important tools available to the developer is the command-line interface called simply mysql which is located in the bin directory of both the Unix and Windows systems. mysql is both an interactive and noninteractive application that gives you complete control over the MySQL database server and its related tables. You start the .