TPC-H schema and data someone has? - postgresql

Has someone the TPC-H schema?
I try to compile but has some errors.
I need the sql schema file.
And if possible the data sql file.
Thanks

TPC-H have a DBGEN that generates a database.
You can see at : http://www.tpc.org/tpch/

I maintain a repo of the data generator and schema here: https://bitbucket.org/tkejser/tpch-dbgen. It is a bit nicer to work with than the one from TPC.
There is a postgres ready schema in the repo as well as a makefile that does The Right Thing for Postgres.

Related

Do I need to use migrations for my schema or it's useless and I need to create everything on the fly?

I'm new to MongoDB and don't know about the best practices.
So, my question is:
Do I need to use migrations for my schema or it's useless and I need to create everything on the fly? Thanks
Not only you don't need to create migrations, you can't.
Assuming you mean schema migrations. Data migrations are still useful/good idea.

what is mean by schema less in No SQL?

I am just a beginner in No SQL, while learning I saw its schemaless. Yes, I understand if I have to insert data, the data structure is not required on No SQL (without creating tables or collection), but other than that what it differs from SQL in the case of schemaless? In SQL I can add new fields to table with queries and No SQL can also do that.
Please advise if I am miss understand the concept and help me get this answer.
Thanks in advance
I think you should go through with this question and answer on stackoverflow:
What does being schema-less mean for a NoSQL Database?
OR
The Value of Schema-Less Databases

Migrating a schema from one database to other

As part of some requirement, I need to migrate a schema from some existing database to a new schema in a different database. Some part of it is already done and now I need to compare the 2 schema and make changes in the new schema as per gap finding.
I am not using a tool and was trying to understand some details using syscat command but could not get much success.
Any pointer on what is the best way to solve this?
Regards,
Ramakant
A tool really is the best way to solve this – IBM Data Studio is free and can compare schemas between databases.
Assuming you are using DB2 for Linux/UNIX/Windows, you can do a rudimentary compare by looking at selected columns in SYSCAT.TABLES and SYSCAT.COLUMNS (for table definitions), and SYSCAT.INDEXES (for indexes). Exporting this data to files and using diff may be the easiest method. However, doing this for more complex structures (tables with range or database partitioning, foreign keys, etc) will become very complex very quickly as this information is spread across a lot of different system catalog tables.
An alternative method would be to extract DDL using the db2look utility. However, you can't specify the order that db2look outputs objects (db2look extracts DDL based on the objects' CREATE_TIME), so you can't extract DDL for an entire schema into a file and expect to use diff to compare. You would need to extract DDL into a separate file for each table.
Use SchemaCrawler for IBM DB2, a free open-source tool that is designed to produce text output that is designed to be diffed. You can get very detailed information about your schema, including view and stored procedure definitions. All of the information that you need will be output in a single file, and can be compared very easily using a standard diff tool.
Sualeh Fatehi, SchemaCrawler
unfortunately as per company policy, cannot use these tools at this point of time. So am writing some program using JDBC to get the details and do some comparison kind of stuff.

How to migrate database from SAP DB to PostGres?

Any idea how to go about doing that through a tool(preferred). Any alternate ways to do that.
You can check out the migration studio from EnterpriseDB here, although I have no experience with it.
There is no comparison to doing it yourself though - if you're not familiar with Postgres then this will get you familiar, and if you are, then aside from the data entry aspect, this should be old hat.
Use maxdb tools to generate a SQL text export of the database. Then import this file in PostgreSQL, luckily you won't need prior processing of the data dump.

Transact SQL - Information Schema

Is there a way to query an Information Schema from DB2 and dump the contents(tables - structure only),into another database? I'm looking for a way to create a shell model of a database schema from DB2 into a SQL Server database?
Thanks
You can use db2look to get the table structure (DDL) out of db2.
Once you've got it, however, I'm afraid you'll have to manually replace any db2-specific syntax (datatypes, storage parameters, etc.) with it's corresponding SQL Server syntax.
It doesn't look like Microsoft's Migration Tool works for db2 yet. :(