Configure JaVers to create tables in a particular schema - postgresql

When using JaVers, JaVers is creating its 4 tables in the public schema in Postgres (http://javers.org/documentation/repository-configuration/#connection-provider). I would like to configure it to save these tables in a new schema, example, AuditSchema. Is this possible to configure?

It's available now. Just set property javers.sqlSchema=AuditSchema

No, there is no such feature, see https://github.com/javers/javers/blob/0e21d83ada5678eb9b396606dd6bc926ddf87b23/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
It might be a good candidate for contribution to JaVers but all supported SQL dialects should be concerned (MySql, Postgres, MS SQL, H2, Oracle)

Related

PGAdmin create ERD from explicitly selected tables?

I have the ability to generate an ERD from an entire DB. My DB is huge and I want to focus on a subset of table relationships. Is this supported in PGAdmin? Additionally, if it isn't is there a free/open-source tool that does support this?

db2look from SQL

Is it possible to get the table structure like db2look from SQL?
Or the only way is from command line? Thus, by wrapping a external stored procedure in C I could call the db2look, but that is not what I am looking for.
Clarification added later:
I want to know which tables have the non logged option from SQL.
It is possible to create the table structure from regular SQL and the public DB2 catalog - however, it is complex and requires some deeper skills.
The metadata is available in the DB2 catalog views in the SYSCAT schema. For a regular table you would first start off by looking into the values in SYSCAT.TABLES and SYSCAT.COLUMNS. From there you would need to branch off to other views depending on what table and column options you are after, whether time-travel tables, special partitioning rules, or many other options are involved.
Serge Rielau published an article on developerWorks called Backup and restore SQL schemas for DB2 Universal Database that provides a set of stored procedures that will do exactly what you're looking for.
The article is quite old (2006) so you may need to put some time in to update the procedures to be able to handle features that were added to DB2 since the date of publication, but the procedures may work for you now and are a nice jumping off point.

Sybase ASE 15.5 and which JPA implementation?

Which JPA implementation supports the following features against Sybase ASE 15.5 and how well?
Schema import (there is an existing server running; Hibernate does not even find existing tables.)
Schema export (maybe for new stuff; Hibernate seems to have no support for UNIVARCHAR)
stored procedure support
stored procedure import? (like schema import)
UNIVARCHAR type support (Hibernate does not per-se generate UNIVARCHAR columns, how about OpenJPA?)
TEXT type support.
schema migration including data migration tools
Any other pros/cons?
JPA is a runtime, not a development tool. Most of your questions seem to be tooling related, for which I would suggest using Eclipse JPA (Dali).
You can use any schema tools you want with any JPA provider, as long as they generate standard JPA metadata.
EclipseLink supports calling stored procedures on Sybase, including output parameters and multiple resultsets.
Any JPA provider should work at runtime with UNIVARCHAR and TEXT, to have the type used in default schema generation you would set them in the #Column columnDefinition, or customize the SybasePlatform in EclipseLink to use the type by default.

how to always prepend schema name in jpql - jpa

I have tables across 3 different database schemas. JPA confuses itself because it tries to find the table at the wrong schema.
I know I can specify the schema at the #Table annotation but, one of the schemas varies and I can't block it's name.
So, my idea is to tell JPA to always prepend the schema name in the queries it creates, whether I define it or not in the #Table annotation.
Is this possible?
Any other solution?
Thanks!
Note: I'm not using Hibernate, I'm using Toplink.
Use a JPA orm.xml and define the schema/catalog in there in the global section. Works fine with DataNucleus JPA when you do that.
Talk to your DBA to see if he can create a schema that will merge all three schemas. That way your application will only have to deal with one schema. DB2 for zOS can do this and it saved having to create different orm.xml files for each environment.

Is there a web-like DB tool for navigating relational databases?

Is there a tool that implements hyperlink-style navigation between tables via foreign keys? Web-based or native app.
For example, if I have table Users, with a column containing a foreign key reference to table Preferences, such a tool would implement simple 1-click access between the rows of the two tables, automatically creating links based on foreign keys.
I'm using MySQL, but I'm hoping for something that might work on multiple RDBMS systems.
I believe PhpMyAdmin will do this for you if properly configured.
Show the 'Tadpole DB Hub'. Tadpole goal is DB Hub for all DB.
Now we are supporting - Amazon RDS, CUBRID, MarisDB, Oracle, MySQL, MSSQL, PostgreSQL, SQLite, MongoDB.