ER Modelling tool for schema generation in SAP HANA - sql

Is there any good ER Modelling tool available for SAP HANA , which accomplishes the following :
Creation of ER Diagrams
Generating HANA specific SQL Scripts
Connecting to HANA DB Instance
Generating all schema objects modelled
TIA

There are two tools from SAP:
SAP (Sybase) Powerdesigner, also supporting different other DBs, e.g. for reverse engineering. With Powerdesigner you can model conceptual, logical, physical Data models and also generate a HANA DB schema in different ways, e.g. by generating scripts containing "create..." statements or CDS files.
Then there is the Enterprise Architecture Designer which can be installed as addon in HANA XS advanced starting with HANA 2.0. This tool is quite new and I have not worked with it yet.
There are probably also tools from other vendors.

The Web IDE for SAP HANA that was delivered with XS Advanced in SAP HANA 2.0 SP01 sounds like what you are looking for as it has a graphical editor to create and link database entities (this is what it looks like):
Core Data Services graphical editor Web IDE for SAP HANA
With XS Advanced, the model is container-based and schema-less.
Here are a couple of links if you would like to try it out:
Getting started with XS Advanced (in the HDI step, right click on any of the .hdbcds files and you will have the option to open it in the graphical editor): https://www.sap.com/developer/groups/hana-xsa-get-started.html
If you need to integrate a database schema from XS Classic or, for example, an ERP replicated schema, you can search for xsa-create-user-provided-anonymous-service in the same site
As for "HANA-specific SQL scripts", it depends on what you are trying to do. If you want to access data in an optimized way and perform calculations, you can use Calculation Views, which are built graphically and the DB will do the equivalent to SQL under the hood. There are some tutorials in the developer[dot]sap[dot]com website, under the Developer->tutorial menu.
If you do not have a HANA instance to try this and/or EA designer you can download your own HANA instance for free:
Download SAP HANA, express edition (you will need the XS Advanced tooling that includes the Web IDE for SAP HANA): sap[dot]com/developer/topics/sap-hana-express.html
If your computer does not have enough resources to comfortably host your HANA instance, there's a blog on how to install it in a cloud platform using a free operating system, search for hana-express-edition-on-google-cloud-platform-and-ubuntu (sorry, I cannot post any more links).
Cheers!

Related

How to get a diagram of a database on Azure sql on MacBook

I'm totally new in SQL and trying to find a way to get the diagram of a database. As most of you know it's just a right click for windows user. However it's a bit difficult for MAC&Azure users (at least for me). I can get a schema through database >> manage >> schema visualisation, but it's not as good as the diagrams on windows and I can't extract it most of the times due to the various errors! So, are there any free extension or other ways that I can use to see the primary keys and the ties between tables? Thanks in advance.
You can use JetBrains DataGrip tool to create database diagrams. DataGrip is a SQL server GUI tool for Windows, macOS, Linux. To generate a database diagram in DataGrip,
Right click database object in the database explorer.
Select diagrams -> Show visualization
Image Reference: Database diagrams | DataGrip Documentation

How do I access netsuite data using SQL language

A company uses netsuites to make purchase orders and store sales information. The only way this company is able to access this information at the moment is through building netsuites reports
Is there a way SQL language could be written to access the netsuites data as some of the questions asked by the business need something a bit more complex than what netsuites reporting provides - and sound very easy using SQL language
I have experience in Oracle, mysql, and many other SQL languages so I would like to know how to set up a connection to the companies netsuites data so I can help write custom queries
Netsuite has SuiteAnalytics Connect, which is ODBC. It can be downloaded from a link at the very bottom the home screen of your Netsuite account.
After installation of the application bundle and connecting it to your Netsuite, you can write ORACLE SQL queries via Excel, Access, etc. My experience is that Netsuite uses Oracle SQL in ODBC queries and in Saved Search custom queries.
The way I understand it, the ODBC driver is a separately priced item from NetSuite. Once you have that, you could use Excel, Access, Crystal Reports or anything else that can use the ODBC driver to read the data and write queries against it.
The normal way to access NetSuite data is with SuiteScript -- javascript code that uses the nlapi* calls to get to the data.
You can access Netsuite backend using a number of different tools and it allows running Oracle SQL directly.
Netsuite provides JDBC, ADO.NET and ODBC if it was included in your licensing purchase. You can find the downloads from the main menu - lower left hand of the screen in Settings - Set Up SuiteAnalytics Connect.
ADO.net however is pretty worthless in SSIS as it doesn't allow parameter mapping or SQL from a variable value. I have yet to get the ODBC driver to work correctly - it can connect and show columns of a table but it won't validate saying "The ODBC Source.Outputs[ODBC Source Error Output].Columns[...] on the error output has properties that do not match the properties of its corresponding data source column."
The other options I'm looking into are Cozyroc and Kinsgwaysoft adapters for Netsuite. You could also do SOAP or REST connections if desired.
I've not used this, but there should as of 2014.2 there is an ODBC driver available for read access.
http://www.netsuite.com/portal/landing/2014-2/suiteanalytics.shtml
As previously mentioned, if you have it licensed you can download the ODBC driver from the Netsuite application. I tested some other adapters but found Netsuite's at least as good as the competitors and they provide timely security updates to the drivers as well as both 64 and 32 bit versions.
There are also metadata browsers that are on the net (example is URL below), the type of browser being based on which kind of access you are looking at (web services, verses ODBC, etc).
https://system.sandbox.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/odbc/record/account.html
Within the application GUI there is information you need to connect using their ODBC connection (you need the account id and the role id). The URL is just odbcserver.xxxx.netsuite.com where xxx is specific to your environment you are accessing. Note that other adapters such as Cozyroc, etc. require the admin to setup connections in Netsuite for those.
Here is a list of the main metadata tables:
OA_FKEYS
OA_TABLES
OA_COLUMNS
In addition, note that the URL above does NOT include customization. Plus its not easily consumed by automation tools. But Netsuite provides a set of metadata views within the repository which you can use ODBC to pull from which includes all keys - foreign and primary. AND it does include customizations! I built simple set of ETL jobs that use standard ADO.NET driver within SSIS and the ODBC DSN to pull all the metadata and then use BIML to automatically generate all the extract ETL and related staging tables. You can also easily then use the metadata to detect changes in the underlying database.
Let me know if I can be any help with doing any of this.
There are 3rd party tools, like CData ODBC Adapter for NetSuite: http://www.cdata.com/drivers/netsuite/odbc/ . This tool allows you to run standard SQL against the NetSuite API. Note that the NetSuite API presents a very different data model from that of the native NetSuite ODBC.
With this tool, you install in onto your machine (Win in my case) and then after you configure the driver, you can run SQL against it (the driver config is where you specify your NS credentials, etc.).
It revolutionizes access to NetSuite data IMHO.
Download the Netsuite ODBC drivers, set up your DSN locally with server/credentials, Use SSIS pkgs to automate data extract and load onto you local DB. Use ADO.NET drivers if preferred. Then utilize those tables to create/deliver your complex reports using SQL (stored procedures) and Reporting Services. This will require SQL Standard license at minimum though.
Only API call can access the NetSuite data
You can't access to Netsuite data using sql language.
The only way to gain access to Netsuite from third party systems is to use SOAP request or PHP toolkit.

Database reverse engineer installation

I have an existing database (SQL Server 2008 R2), and my goal is to have a project that can install the same database as I already have.
i.e the project will read the schema and the data, and will be able to duplicate the existing data and schema.
This tool needs to save the database information to disk so I will able to install the database on different machines.
Can I do it with Visual studio 2010 database projects?
Is it a simple task?
(The reason I am asking is that I already have such a project that installs my database, but this tool is very old(~2000).
That old project is one big mess, it has C#, java, sql, batch files and some 3rd party tools and has many more capabilities than I need for my current product..)
Thanks.
Use SQL Server Management Objects (SMO) to create a snapshot of your source db and then restore it to the target server.
More on SMO here: http://msdn.microsoft.com/en-us/library/ms162169.aspx .
A nice tutorial here: http://www.codeproject.com/KB/database/SMO_Tutorial_1.aspx
The easiest way is to backup using SQL server management studio. Then move the backup file to the second server and there restore it with SQL server management studio. If you need SQL code to do it (instead of GUI way), just drop a comment...
This codeplex project has a basic library that does that if you like to roll your own and has two sample projects for migration/comparison tasks.
http://dbschemareader.codeplex.com/
Also the commercial option is to use Sql Redgate's tools. They are expensive but worth every penny if this is a mission critical database. On the otherhand, if you are just using a db as an alternative to a file, say in a embedded scenario, it might be hard to justify such an expensive tool.
Have you tried DBSourceTools ? http://dbsourcetools.codeplex.com
It is an open-source database versioning tool that will script out all database objects and data to disk, and then re-create the database on another machine.
It has all of the features that you are looking for.

Can I use DSN connections on Business Intelligence Design Studio?

I was wondering if there is a way to use data sources for source/destination stored in system DSN (the "connections" you add on control panel by going to Administrative Tools -> ODBC Data Sources) in Business Intelligence Design Studio.
Thanks in advance!
No there's no way to do that. You can use configuration files or tables to manage what the connection managers actually connect to though.

Approaches to building reports with Quickbooks 2008+ Data

I am looking to build some reports for Quickbooks data, without using Quickbooks built-in reporting, or through a third party library (like QODBC).
Quickbooks 2008 and newer are built on a SQL backend.. In looking around there seems to be several products and angles to do this from.
Ideally I would like to be able to do direct SQL hits on the database myself, or use something like Crystal Reports.
I wanted to ask here to gather any things to look at closer, and what to potentially avoid to save myself grief.
Thanks in Advance!
Update: It seems Quickbooks encrypts it's sql database so you can't read it directly with a reporting tool.. There are a few products on the market that can help.. more to come.
Your best bet is the QuickBooks SDK, it provides facilities to fetch data and also fetch reporting data directly from QuickBooks, formatted as XML for easy parsing and display however you want to display it.
You can see the data that's available using the qbXML/QBFC QuickBooks On-Screen reference (the requests you can send to QuickBooks are found in the 'Select Message' drop-down box at the top of the screen).
The QuickBooks SDK is a free download (registration required) from the Intuit Developer Network
If you're writing a desktop application, you can look into using QBFC, which is an API that talks to QuickBooks using COM/DCOM.
If you're using PHP, there's a popular QuickBooks PHP framework on the IDN forums.
If you're using ASP.NET, here's a QuickBooks ASP .NET framework too.
If you want direct SQL access, you should look at QODBC (which is an SQL wrapper which translates SQL queries to qbXML SDK requests) or AccessBooks (which uses the SDK to mirror QuickBooks data to an SQL database).
If its hosted on SQL 2005 or 2008 you can make use of Reporting Services (free) and the Report Builder that is bundled with it. If you use 2008 then I recommend downloading Report Builder 2.0
http://www.microsoft.com/downloads/details.aspx?familyid=9f783224-9871-4eea-b1d5-f3140a253db6
Here's some links to learn RS:
http://www.google.com/search?q=reporting+services+tutorial+video&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
So are you on the 2008 edition (SQL Server)?
If so, you can use SSRS as SQLChicken posted, or you can use just about any other reporting tool, and connect via SQL Native Client (shipped with SQL Server):
- Crystal Reports
- Excel
- insert your favorite reporting tool here