Connecting to Database using ODBC, Node, & Sequelize - mysql

So, I have a proprietary database that can be connected to via ODBC driver. Someone on my team has confirmed that they can connect to the database using an ODBC driver in Microsoft Access and see the data inside of the database.
If possible, I would like to connect to this database using Sequelize but I am out of my element when it comes to ODBC drivers and how exactly they work.
In this video, I saw an example of someone creating an ODBC connection to a database (The video gives two examples. One for a Hive connection and another for MySQL) and then said person used Python to run queries on these connections.
Is there a way that I could do something similar with Sequelize?
I see that Sequelize supports MySQL so my hope is that I can use Sequelize to connect to MySQL, which has a connection to the proprietary database via ODBC, and run queries on the MySQL connection.
Is this possible? I feel like I might be misunderstanding how all of this ODBC stuff works.

Related

Connect to local MySQL Workbench DB via sqlplus

I'm trying to learn PL/SQL language. On my mac laptop (macOS Monterey, M1) I have the following set up:
MySQL Workbench running a test database
and SQL*Plus installed in the terminal
My question: How do I connect to my local MySQL Workbench database via sqlplus?
I imagine I need a user/pass and to specify localhost 3306 as the connection endpoint... but where do I find these things, how do I set them up? I've looked at Oracle documentation but haven't found the answer.
Any help would be greatly appreciated! This is study for a SQL interview. Thanks in advance.
-Sebastian
Either you need to use MySQL Workbench as a client for MySQL Server, or else you need to use SQL*Plus as a client for Oracle Server. These are two different brands of database (although they are both owned by Oracle Corporation) and the clients cannot connect to each other's database.
Your statement of connecting to MySQL Workbench using SQL*Plus makes no sense anyway, since both of these are clients.

Connecting MySQL to external data source using proprietary ODBC Driver

I have a cloud-based CRM system that provides a proprietary ODBC Driver.
This has been fully configured, set up as a system DSN, and tested with no errors. The system DSN is called 'servicenowdev'.
I also have a local MySQL server, that I would like to connect to the CRM system and download periodic backups. I can connect to the 'servicenowdev' DSN using i-SQL and run queries fine, but I would like to link the server (MS SQL Server "Linked Server" style), but in MySQL.
Where do I start with connecting my MySQL server to this dsn?
I don't know the internal details of the CRM system to provide a database name, host, port or any other details for a FEDERATED SERVER connection.
Can I create views straight to the dsn's tables, or would I have to import data locally?
I have an alternative, albeit not the most efficient, method. In essence I start with MS Access by creating pass through query using the
ServiceNow ODBC. (SELECT * FROM servicenow.table)
I then perform an insert query into a local access table using the pass through query as the source
(INSERT INTO table SELECT * FROM query)
Then I export the table to the MySQL database using the MySQL ODBC.
Hoping you've found a better method but if not then hope this helps.

What is the purpose of an ODBC driver when connecting to a MySQL server?

I've been wondering what are the benefits of using an ODBC driver to interface with a MySQL server? What advantage does that have over directly connecting to the server via TCP and firing off your SQL commands directly?
I'm working with a code base written in labVIEW that references a UDL file which references a data source and its associated ODBC driver to handle the connection to the server. I'm not yet convinced its necessary. I can see the benefit of using a driver if you are connecting to Microsoft Access or excel but if your recipient is an SQL server of some type why would you need a middle man to handle your SQL commands?
I have used the ODBC driver 3.51 for connecting to MySQL Community Server 5.1 for some time now. The ODBC driver allows you (on a Windows computer) to add your MySQL connection to the ODBC data sources list. Now you can reference this data source in many compatible applications. I have been able to use this ODBC connection in VB.Net applications as well as proprietary applications for printing and other functions with ODBC functionality.
I would say that when coding web or python applications i always use the built in MySQL packages, but if you need to access your data through VB.Net or another proprietary application (like a stand-alone windows app) you probably need to set up a system ODBC data source to access your database. To me the ODBC lets Windows access MySQL easily. Without Windows i don't think you need it.
Why ODBC and not JDBC? Some reasons come to mind in order of helpfulness when using JDBC:
Standard api to access the results from a query. To iterate over the results and to get the actual values with the appropriate type.
No need to know how the protocol works to connect to the server. Just use the host, user, password, send the SQL and iterate over the result.
Abstract out the connection to the database. Changing the database should be simpler.
Standard way to commit and rollback for transaction based changes.
In my experience, JDBC is very verbose. You need to write many lines to accomplish simple things. I've found the Spring JDBCTemplate wrapper to be an extremely easy to use alternative for simple stuff.

Replication between SQL Server and MYSQL

I am trying to set up replication between SQL Server 2008 and MYSQL. I have installed a MySQL ODBC 5.1 driver on the MySQL server. Initially I was trying to just set up a linked server between the two databases which is working fine.
However now I am trying to set up replication in SSMS. I have created a simple publication but I am having problems setting up the subscriber. The only heterogeneous datasources it seems I can set up under Oracle and IBM. I do however think that I should be able to use the ODBC driver installed and replicate to the MySQL database.
Any ideas?! Thanking anyone in advance
The documentation is very clear that only Oracle and DB2 are supported in any way, and only when using OLE DB, not ODBC. Therefore, trying to set up replication to MySQL using ODBC is almost certainly a waste of time.
Having said that, native SQL Server replication is not the only way to copy data between databases, and if you can give some more information about your requirements then someone may have an alternative solution.
For example, if your goal is some form of reporting or data warehousing then you can look into the many ETL tools that are available and work with many different databases. (I'm assuming your goal is not redundancy or availability, because you're using two different platforms.)

How do I connect webapp VB/LINQ to a MySQL database server on a Linux

I have a programmer who is using VB and LINQ; and I have a MySQL database that is running on a linux server. My programmer tells me that:
he cannot connect to the MySQL database via LINQ
if he was able to connect then it would require all sorts of rewriting
I don't know anything about LINQ but I thought it was an ORM. As such, any DB server that is supported should work just fine? Right?
OK, so maybe it's not an ORM... maybe it should generically connect to ODBC and render similar results?
Is there any advice out there for connecting VB+LINQ to MySQL?
you could use an open source project like http://code2code.net/DB_Linq/index.html
or you can use Linq to NHibernate: http://ayende.com/Blog/archive/2007/03/16/Linq-for-NHibernate.aspx
or even InterLinq if you want to make a multi-tier setup: http://www.codeplex.com/interlinq