How to connect to Apache AGE from .Net 7.0? - .net-7.0

For Apache Age there is a driver for Python, Golang and a couple of other languages, but there is no driver in C# for .Net 7.0. How to use this graph DBMS from .Net 7.0?
If there is, give a link to an example connection from .Net.

There is no driver for .Net yet but what you can do is use some existing library to connect to PostgreSQL and then load Apache Age using PostgreSQL queries. Once you load it you can run the queries just like in PostgreSQL. For loading Apache Age make sure you have Apache Age installed and set up in localhost.
To load Apache Age use these commands
CREATE EXTENSION IF NOT EXISTS age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

Related

How to connect my website with DB2 on Cloud?

I have a site and there is register system that introduce data into RDBMS via php. I had PostgreSql on localhost and now I wanna connect my website with "DB2 on Cloud" from cloud.ibm.com How can I do it and what I must use?
I used to connect with postgres via .php, but with db2 must I use JDBC,ODBC or other APIs? or with other things for RDBMS.
You can use IBM's php_ibm_db2 module to connect a PHP website to a remote database on Db2-on-cloud. This module uses an ODBC (also known as CLI in Db2) connection to the database, and it requires a CLI driver for the database connectivity, and such a driver is freely downloadable from IBM by following the instrucuctions).
You can use a classic interface or a PDO style interface, both are supported in php_ibm_db2.
You will have a learning curve, so careful study of all the documentation is necessary.
Depending on your platform, you may need to compile that module, but some precompiled modules are available.
See https://github.com/php/pecl-database-ibm_db2
See also https://www.ibm.com/docs/en/db2oc?topic=programmatically-php

How to access Alfresco database via url?

in my alfresco-global.properties file it says:
db.url=jdbc:postgresql://localhost:5432/${db.name}
I want to know how to access this database in the browser?
The default PostgreSQL client application is psql. If you can't install this or if you want to use a GUI client, the PostgreSQL community maintains a list of GUI clients.
Every client either asks you for credentials or will present you a form where you can enter them.
The JDBC URL from your question is
jdbc:postgresql://localhost:5432/${db.name}
My guess is that db.name is equal to alfresco. So the complete JDBC URL would be
jdbc:postgresql://localhost:5432/alfresco
If you have installed Alfresco only your local computer, this would be the JDBC URL to use with a client that uses JDBC. If you have installed Alfresco on a different computer, you would have to replace localhost with the host name of this computer.
To connect to alfresco data base you can use any Postgresql client, by the way, alfresco install pgAdmin client.
To use this client you shoud open {alfresco_install_directory}/postgresql/bin/pgAdmin3, add new server and type database credentials(host, port ...) from alfresco-global.properties.
Edit
This is an example of configuration, you can find all what you need in alfresco-global.properties.
In case you have made the default installation(postgresql), you cant.
If you have switched the database to mysql you could use something like php admin or similar. Hope it helps.

How to deploy database on linux

I have a small asp.net core website that I push to my server via jenkins. Jenkins does git checkout and then dotnet restore and dotnet run. It works for the website, but I added entity framework and I'm a little confused. How exactly do I move my local database to the server? Or should I create one on the server and then reference it?
I have one mssql database on (localdb)\MSSQLLocalDB, but when I run the server and try to go to a page which gets data from the database I get 500 Internal Server Error.
I would like to have one local db for testing and one on the server, but I just can't wrap my head around all of this.
Well in development, you should write a init script for your database. This will create all the required stuff your application needs.
So in linux...
Install the MySQL, get the users set up, and init the database.
In your application...
Provide the connection string for the DB installed in Linux.
I am not running my app in c# but this is similar to my node app. That is what I do. I develop in windows with Postgres. Then my prod is on a GoDaddy Linux cloud server and I have Postgres installed in that. When I do my git pull for the latest, I don't have to change much because of the .env file for my environment variables.

Multiple DB support using JDBC

We are having an application which is already developed(Very OLD application,That time ORM was not in Market) and use Oracle as a database using JDBC. Now we are in situation where we have to connect different database like Postgres. We can not use ORM or such tool at this stage when application is completely developed. Is there any way so that we can provide multiple db support for our application using JDBC.
You can create multiple Datasource connections using the Apache commons DBCP package.
If you have a Spring Application you can easily have this configured in your spring application context.
http://javarevisited.blogspot.in/2012/06/jdbc-database-connection-pool-in-spring.html
Connection Pooling with Apache DBCP
Or you can have them defined as JNDI in your web server like JBOSS

SQL connection in UWP app

I have am existing project that runs on windows, mac, ios and android. I'm looking for a way to make a windows phone version, but I can't figure out how to use SQL. My current code base is very large and I can't "switch" to using EF. How can I get access to databases in UWP?
If you want to connect a local database, for example the SQLite, there are implemented libraries could be used do this stuff:
A Developer's Guide to Windows 10: (10) SQLite Local Database
If you want to connect a server-based database, for example, the SQL Server database, unfortunately, there is not a built-in API like ADO.NET that could be used to connect the SQL Server directly. And for a workaround, you would have to utilize a middle layer for example, the WCF Serrvie:
How to access data from SQL Server database in Windows Store app, although this sample is written for store app, the used approach is the same for UWP application.
You'll not be able to connect directly to a Microsoft SQL Server database. Instead you'll need to make some type of Service layer that communicates with the database and your phone app would need to communicate with that. For more information on how to do that see the code same and the video that Microsoft has hosted here:
https://code.msdn.microsoft.com/windowsapps/How-to-access-data-from-5f2602ec

Resources