# db-meta **Repository Path**: ubesmile/db-meta ## Basic Information - **Project Name**: db-meta - **Description**: db-meta 是关系型数据库元数据获取工具,把数据库->schema->表->列,主键、外键、索引,触发器、存储过程、函数等抽象为对象,易于使用方便序列化 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/db-meta - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2023-01-14 - **Last Updated**: 2024-12-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README db-meta ======= Db-meta is a free database schema discovery and easily tool. Db-meta now can support mysql, sql server and oracle. It is easy to extend. Db-meta's output meta is object, so it is easy to use in your project. And our library is thread safety. Example Usage ======= You can download the demo and run it by yourself.[db-meta-demo](https://github.com/wukenaihe/db-meta-example) Architecture

Meta data architecture

![metaclass](https://raw.githubusercontent.com/wukenaihe/db-meta/master/db-meta/src/main/resources/metaclass.jpg "metaclass")

soft Architecture

![frame](https://raw.githubusercontent.com/wukenaihe/db-meta/master/db-meta/src/main/resources/frame.jpg "frame")

API

In order to improve performance, avoid to crawle useless meta ,we use schemalevel. |min | standard | max | --------------|------|----------|-----| JdbcDriverInfo| Yes | Yes | Yes | DatabaseInfo | Yes | Yes | Yes | Table | Yes | Yes | Yes | Column | Yes | Yes | Yes | PrimaryKey | Yes | Yes | Yes | Constraint | Yes | Yes | Yes | View | NO | NO | Yes | Index | NO | Yes | Yes | ForeignKey | NO | Yes | Yes | Privilege | NO | NO | Yes | Trigger | NO | NO | Yes | MetaLoader interface is what you need. Method |Description ------------------------------------------------------------|----------------------------------------------------------- Set getTableNames() |Get table names(current Schema) Table getTable(String tableName) |Get table(SchemaInfolevel.standard) Table getTable(String tableName,SchemaInfoLevel schemaLevel)|Get table Table getTable(String tableName,SchemaInfo schemaInfo) | Set getSchemaInfos() |Get current schema information Schema getSchema() |Get current schema Schema getSchema(SchemaInfo schemaInfo) |Get schema ,according to the SchemaInfo Set getProcedureNames() |Get the user's procedure names Procedure getProcedure(String procedureName) |Get the procedure information,according to the name Map getProcedures() |Get the user's procedures Set getTriggerNames() |Get the user's trigger names Trigger getTrigger(String triggerName) |Get the trigger information, according to the trigger name Map getTriggers() |Get the user's triggers Set getFunctionNames() |Get the user's function names Function getFunction(String name) |Get the function information, according to the name Map getFunctions() |Get the user's functions Database getDatabase() |Get all the meta data of the database(Standard) Database getDatabase(SchemaInfoLevel level) |Get all the meta data of the database Licenses ======= Copyright [2014] [XuMinhua] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Remark ====== E-mail:wukenaihesos@gmail.com