All Projects → houbb → metadata

houbb / metadata

Licence: Apache-2.0 license
oracle,mysql,sql server 元数据管理表生成

Programming Languages

java
68154 projects - #9 most used programming language
FreeMarker
481 projects
javascript
184084 projects - #8 most used programming language
SQLPL
141 projects
CSS
56736 projects

Projects that are alternatives of or similar to metadata

SchemaMapper
A .NET class library that allows you to import data from different sources into a unified destination
Stars: ✭ 41 (-8.89%)
Mutual labels:  sql-server, oracle
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (+86.67%)
Mutual labels:  sql-server, oracle
Dbal
Doctrine Database Abstraction Layer
Stars: ✭ 8,495 (+18777.78%)
Mutual labels:  sql-server, oracle
Ebean
Ebean ORM
Stars: ✭ 1,172 (+2504.44%)
Mutual labels:  jdbc, oracle
BETL-old
BETL. Meta data driven ETL generation using T-SQL
Stars: ✭ 17 (-62.22%)
Mutual labels:  metadata, sql-server
Dev.Data
The Dev.Data.SqlDatabaseCommand is a set of components helping C# developers to execute SQL Queries and to retrieve data from SQL Server.
Stars: ✭ 15 (-66.67%)
Mutual labels:  sql-server, oracle
Sqlprovider
A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
Stars: ✭ 423 (+840%)
Mutual labels:  sql-server, oracle
oracle-jdbc-tester
A simple command line Java application to test JDBC connection to Oracle database
Stars: ✭ 37 (-17.78%)
Mutual labels:  jdbc, oracle
Sqlfiddle3
New version based on vert.x and docker
Stars: ✭ 242 (+437.78%)
Mutual labels:  sql-server, oracle
Fluentmigrator
Fluent migrations framework for .NET
Stars: ✭ 2,636 (+5757.78%)
Mutual labels:  sql-server, oracle
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+10333.33%)
Mutual labels:  jdbc, oracle
database-metadata-bind
A library for binding information from java.sql.DatabaseMetadata
Stars: ✭ 17 (-62.22%)
Mutual labels:  metadata, jdbc
Requery
requery - modern SQL based query & persistence for Java / Kotlin / Android
Stars: ✭ 3,071 (+6724.44%)
Mutual labels:  jdbc, oracle
awesome-sql
List of tools and techniques for working with relational databases.
Stars: ✭ 199 (+342.22%)
Mutual labels:  sql-server, oracle
PECI-Java-MAR-2015
Repositorio del curso de Java de Mar 2015
Stars: ✭ 29 (-35.56%)
Mutual labels:  jdbc, oracle
Entityframework.exceptions
Handle database errors easily when working with Entity Framework Core. Supports SQLServer, PostgreSQL, SQLite, Oracle and MySql
Stars: ✭ 266 (+491.11%)
Mutual labels:  sql-server, oracle
Obevo
Obevo is a database deployment tool that handles enterprise scale schemas and complexity
Stars: ✭ 192 (+326.67%)
Mutual labels:  sql-server, oracle
data-profiling
a set of scripts to pull meta data and data profiling metrics from relational database systems
Stars: ✭ 57 (+26.67%)
Mutual labels:  metadata, oracle
Schemacrawler
Free database schema discovery and comprehension tool
Stars: ✭ 1,021 (+2168.89%)
Mutual labels:  metadata, jdbc
Zeko-SQL-Builder
Zeko SQL Builder is a high-performance lightweight SQL query library written for Kotlin language
Stars: ✭ 87 (+93.33%)
Mutual labels:  jdbc

MetaData

元数据管理小工具。

作用:可以自动将所有的表信息和字段信息存入元数据表中,便于统一查阅。(注释需要保证库本身已经包含了对于表和字段的注释)

方式

用于为数据库提供两张表。 meta_field, meta_model

表名称 说明
meta_model 用于存放所有的表信息。(包含元数据表)
meta_field 用于存放所有的表字段信息。(包含元数据表)

MYSQL DLL

SQL SERVER DLL

ORACLE DLL

变更日志

变更日志

环境

支持数据库

数据库 是否支持 测试版本
MySQL YES 5.5, 5.6
SQL Server YES 2008 R2
Oracle NO
MongoDB NO

备注:测试条件限制,只对手中的数据库版本进行了测试验证。

问题:有没有一种环境,可以模拟各个版本的数据库?

  • 思考

数据库的种类繁多,不胜枚举。应该为每一个数据库提供好可覆写的方法。脚本分类提前留好地方。

不同的数据库脚本是不同的。可以使用 PowerDesigner 进行统一生成设计。(mac DbWrench Database)

JDK

测试为 Jdk1.7, JDK1.8

快速开始

Before Start

你需要熟悉 maven,tomcat,jdk

Download

  • 方式一

直接点击下载本项目:https://github.com/houbb/metadata

  • 方式二

使用 Git 直接签入到本地:

git clone https://github.com/houbb/metadata

编译

将下载的项目用编辑器打开。推荐 IDEA

本项目 jar 管理使用 Maven,请确保已正确配置。

在根目录运行命令打包:

mvn clean install

部署运行

有两种方式:

  • tomcat

将编译生成的 war 部署到 Tomcat 运行。

  • tomcat7 plugin(推荐)

运行模块 metadata-web 下的 maven tomcat7 插件。

访问

默认的 tomcat7 plugin 端口号为 18082。

任意浏览器打开 http://localhost:18082/ 即可。

使用方式

MySql 使用方式

mysql 页面指定数据库链接信息,点击【Execute】按钮即可。

  • 属性说明
属性 描述 默认值
Host 地址 localhost
Port 端口号 3306
DataBase 数据库名称
Username 用户名称 root
Password 密码 123456

metadata-mysql.png

测试案例

测试前

  • 测试脚本
CREATE DATABASE `metadata-test`
  DEFAULT CHARACTER SET UTF8;
USE `metadata-test`;

CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
  `username` varchar(255) DEFAULT NULL COMMENT '用户名',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8 COMMENT='用户表';

原始数据如下:

mysql> show tables;
+----------------+
| Tables_in_metadata-test |
+----------------+
| user           |
+----------------+

执行脚本后

mysql> show tables;
+-------------------------+
| Tables_in_metadata-test |
+-------------------------+
| meta_field              |
| meta_model              |
| user                    |
+-------------------------+
  • meta_model 内容
mysql> SELECT * FROM meta_model \G;
*************************** 1. row ***************************
          ID: 1
         uid: cdae6d5ab5bd4e8fac974e6cbfb0d9c1
        name: meta_field
dbObjectName: NULL
       alias: NULL
 description: 元数据字段表
    category: NULL
   isVisible: 0
  isEditable: 0
  createTime: 2018-01-18 09:48:20
  updateTime: 2018-01-18 09:48:20
*************************** 2. row ***************************
          ID: 2
         uid: 0869811946e34d9bae22d2ac7940a8d7
        name: meta_model
dbObjectName: NULL
       alias: NULL
 description: 元数据实体表
    category: NULL
   isVisible: 0
  isEditable: 0
  createTime: 2018-01-18 09:48:20
  updateTime: 2018-01-18 09:48:20
*************************** 3. row ***************************
          ID: 3
         uid: c94524236260483e9494aa6e5596a787
        name: user
dbObjectName: NULL
       alias: NULL
 description: 用户表
    category: NULL
   isVisible: 0
  isEditable: 0
  createTime: 2018-01-18 09:48:20
  updateTime: 2018-01-18 09:48:20
3 rows in set (0.01 sec)

SQL Server 的使用方式

和上面类似。

sql server 页面指定数据库链接信息,点击【Execute】按钮即可。

  • 属性说明
属性 描述 默认值
Host 地址 localhost
Port 端口号 1433
DataBase 数据库名称
Username 用户名称 sa
Password 密码 123456

Oracle 的使用方式

和上面类似。

oracle 页面指定数据库链接信息,点击【Execute】按钮即可。

  • 属性说明
属性 描述 默认值
Host 地址 localhost
Port 端口号 49161
Service oralce 服务名称 XE
Username 用户名称 system
Password 密码 123456
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].