轻量级数据库结构爬虫 dbcrawler

码农软件 · 软件分类 · 其他开发相关 · 2019-10-28 10:28:18

软件介绍

dbcrawler是一个轻量级数据库结构爬虫。它能够取得数据库的底层结构并返回POJO对象。可以利用其提供的统一API来取得各种不同的数据库系统 的结构,而不用关心这些dbms之间的差异,当底层dbms变化时还是会返回相同的POJO对象。dbcrawler当前只支持MySQL、 PostgreSQL、Apache Derby三种数据库。

示例代码:

DataBase dataBase = DBcrawlerUtility.getDataBase(connection, ConfigEnum.MAXIMUM);
//fetch the DBMS information
RDBMSInfo rdbmsInfo = dataBase.getRDBMSInfo();
System.out.println("rdbmsInfo:" + rdbmsInfo);
//Return Schemas
Set<Schema> schemas = dataBase.getSchemas();
//Iterate to Fetch the schema information and Tables
for(Schema schema : schemas)
{
   
System.out.println("SchemaName :" + schema.getSchamaName());
   
Set<Table> tables = schema.getTables();
   
//Iterate to fetch the tables
   
for(Table table : tables)
   
{
     
System.out.println("tableName :" + table.getTableName());
     
PrimaryKey primaryKey = table.getPrimaryKey();
     
Set<Column> columns = table.getColumns();
   
}
}

本文地址:https://www.codercto.com/soft/d/17734.html

Blog Design Solutions

Blog Design Solutions

Richard Rutter、Andy Budd、Simon Collison、Chris J Davis、Michael Heilemann、Phil Sherry、David Powers、John Oxton / friendsofED / 2006-2-16 / USD 39.99

Blogging has moved rapidly from being a craze to become a core feature of the Internetfrom individuals sharing their thoughts with the world via online diaries, through fans talking about their favori......一起来看看 《Blog Design Solutions》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具