Home  >  Article  >  Backend Development  >  pycharm 使用心得(六)进行简单的数据库管理

pycharm 使用心得(六)进行简单的数据库管理

WBOY
WBOYOriginal
2016-06-06 11:30:311666browse

例如:

1.创建,修改和删除数据表,字段,索引,主键,外键等。

2.提供table editor来进行数据操作

3.提供console来运行sql命令

4.提供数据导出功能

数据库创建方法

1)在pycharm的右上角找到‘database'选项卡

2)打开选项卡,按‘alt+insert'键,选择Data Source。

3)为数据库连接取一个名称,选择一个JDBC driver files。如果没有这个文件,pycharm可以自动下载。

4)选择一个JDBC driver class,mysql默认为:com.mysql.jdbc.Driver。oracle默认为:oracle.jdbc.OracleDriver

5)编写Database URL,示例:
      myql:jdbc:mysql://localhost:3306
      jdbc:oracle:thin:@localhost:1521:server

6)填写用户名和密码。

7)点击Test Connection测试连接。

8)根据提示信息修改错误,知道提示连接成功。

9)OK

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn