Can a cordapp connect to 2 different schemas? - corda

Is it possible to use the node.conf to set up the connection for corda default tables and in my application I set up a connection for my business table?
For corporate reasons I need to keep the product(Corda) and business tables in different schemas.

Yes, that's fine. The node is backed by a standard SQL database, and you are free to connect to this database (e.g. via JDBC) and create or modify other tables.

Related

Is Schema in Oracle is equivalent to Database in Microsoft SQL Server?

I am new to Oracle database and I wanted to create a database in Oracle. I followed this link to create a database:
http://www.fehily.com/books/createdb/createdb_oracle_11g_2.html
In Microsoft SQL Server, when we create a database, we use the create database command and the database creation is instantaneous [within fraction of seconds], but the Database Tool as described in link above took couple of minutes to create the database. Is database creation in Oracle this much slower?
Searching more about it, I have a feeling that this database created using above tool in Oracle is not equivalent to the database we create in SQL Server. Rather, the schema/user in oracle is appearing to be equivalent to database in SQL Server. Is it true?
So, If I want multiple databases in Oracle, do I create a single database and then multiple schemas inside that single database? And then are those multiple Schemas are my databases?
I am very much confused about all this. Can someone please refer me to a nice article/book that explains these things in oracle in detail?
For most purposes, yes you would indeed map a SQL server database to an Oracle schema (=user).
The term "database" in Oracle does not mean the same as in SQL Server. An Oracle "database" (from a technical point of view) is more like a SQL Server instance/installation, rather than a "database" in SQL Server.
SQL Server has two levels of namespace: database and schema. Whereas Oracle only has a single level of namespaces: a schema (which has a 1:1 relation to a user)
SQL Server and Oracle both support Schema.
A Schema is like a new database but it is not a new database
Maybe you are confused, Mysql doesn't support schemas but SQL server offers full support for it.
In mysql your database is a schema, to only difference is that it doesn't support multi schemas
For the part of creating multi databases or a single database if multiple schemas it all depend in your specific situation, you should test thinks like performance and how much money you want to spend, a multi database approach can be very expensive unlike a multi Schema approach

Web Application - Neo4j Database per User

I have been using neo4j in the context of a Java Servlet web application (Maven web app archetype project). I have a separate MySQL server running which stores user information.
The application needs to provide a separate graph database per each user that needs to be stored (preferably in the database, as opposed to a folder on the server).
I have used the following code to create a database:
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase("Neo4j/db");
This stores the database in a local directory on the server host. It would be undesirable to 'pollute' the host by making a local graph database for each user (e.g. it would consume host memory for data storage which is naturally a database responsibility). Also, I would prefer if I do not need to configure and run a separate neo4j server.
Is there some way to keep a neo4j database in memory, serialize it so that the data could be stored in a relational database, and deserialize it when the server needs to use the graph database?
There should be nothing preventing you from having a single Neo4j instance, in which you store all users' graphs. If you think you can solve your problem by having multiple graphs, then it means that the users' graphs are disconnected. In that case, if you start a traversal in one graph, it will not reach the other graphs and thus expose other users' data. All you need is a link between the user in your MySQL database and the user node in Neo4j, which you can achieve by, for example, a property called mysqlId on the :User node in Neo.

Looping through multiple databases

Our application uses multitenant model by implementing one database for each customer. The application is live now and is working fine and there are around 600 databases spread across two database servers. The databases are connected using a master database called admin which stores the details of all other databases. One of the requirement is to check the admin database and find all the databases, check specific tables in the databases and send email notifications. This is a backend process. Currently we use a windows service to do the same but we see that there are delays in sending the mails due to the looping of 600 databases. Is there any other way to handle this?
Thanks,
Anup

How to create federation in an existing azure sql database

Am very new to azure federation.In my project there is an existing SQL azure database and now we want to use azure federation for scaling that database.
How can I achieve this on my existing table myCustomer. Am planning to federate the table based on customer_Id. any relevant tutorial available?.From where should i begin.
By Federation do I have to change my existing queries used in the project.?
Thanks.
A rough summary of the changes you need to make to federate your database are:
Decide on an id you will federate on (e.g. user id)
For each table you wish to federate alter your table schema so the federation key is part of the primary key, and annotate the table so it knows which column is the federation key.
For each query that is run against a federated table you need ensure that the connection used is redirected towards the correct federation.
This last step is currently done by adding the USE FEDERATION statement to your queries. It can be a little tricky to implement if you are using Entity Framework or Linq. Something else to be cautious of in this area is making sure the USE FEDERATION statement is re-run if your transient error handling kicks in.
The links Alexander posted are all good to read.
Did you read the article by George Huey in MSDN Magazine?
It covers transition from an existing SQL or Azure SQL DB to a DB with federations in the section called "Migrating Database Schema from SQL Server or SQL Azure to SQL Azure Federation".
Right after that I would recommend to read the tutorial on data querying (part1, part2).
You will have to change your queries if they want to access the data from federations. Basically, every federation is an independent SQL database and you have first to establish connection to correct federation before querying for data.
There are also some peculiarities how to use federations with Entity Framework, partially due to additional overhead for connection to federation instance, and partially because federations do not provide support for MARS operations (article).

Database changing for .net application

i m having two databases in different environments but both are having same data.Presently my application connecting one database .I need to disconnect that database and i want to connect another database .Is it possible to connect to another database? If Its possible then what are things i have to modify in the application code.
Is it possible to connect to another database?
Yes.
If it is possible then what are things I have to modify in the application code.
You need to change the Data provider APIs especially if you are working with the database specific API e.g Ms-Sql server (SqlClient) or ODP.net (oracle).
For further, read - Data Access Application Block and .NET Data Access Architecture Guide.

Resources