I'm trying to connect these two, but there is no information about it in here, does anyone have working example?
Symfony is agnostic of your persistence system. You can use PDO directly to connect to your Firebird database. Create the appropriates services using the Dependency Injection component to do so.
Alternatively, there is the Doctrine ORM. This library is often used with Symfony because it is installed with the Symfony Standard Edition. Doctrine doesn't support Firebird yet. However, there is a pending Pull Request adding support for it: https://github.com/doctrine/dbal/pull/838
You may try this fork for your project (at your own risk, it's very experimental) and help to finish the Pull Request to get it merged in the upstream project.
Related
Please advise the modern architecture of ASP.NET WebApi application (better .NET Framework not Core) with the latest innovations. For example: Unit of work pattern, controller -> manager -> repository, Automapper, xUnit, Serilog or..., a reliable migration mechanism for Oracle - Liquibase or... Asynchronous execution - async / await.
Requirements: authentication - AD / Windows, DB - Oracle. If there are code examples it would be ideal
UPDATE 1
What about ORM and migration system. In my opinion code first approach and EF migrations is good because the model suit to DB copletely, but it is risky. Previously I made Database Project for MS Sql Server and all change scripts was generated by comparing schemas of original DB and DB changed by EF migration, like this:
create models
apply migration to local (dev) database
compare original DB and changed DB, ectract/generate change SQL scripts
create deployment migration for CI/CD (DB project, liquibase or similar)
rollback local DB and test deployment migration
commit and push
It looks strange, but practice shows that using EFs migrations leads to data loss
For me, an API (which your app exposes to consumers) can be thought of as just another type of presentation layer.
If you assume that's the case then any sensible .Net architecture would suit. Personally I follow an logical approach like this: 5 layer Architecture - https://morphological.files.wordpress.com/2011/08/5-layer-architecture-draft.pdf
Not sure if that answers your question though. I think if you get the logical architecture sorted out, then determining which technologies you use to implement isn't so hard.
The 5-Layer architecture referenced above uses dependency injection, so you can use whatever database technology you like.
Use of sync vs async depends on the nature of the actual functional and technical problems you're trying to solve.
I am researching options for Corda database upgrades and I am puzzled with two different approaches described for Corda Open Source
https://docs.corda.net/upgrading-cordapps.html#state-schema-versioning
vs Corda Entrerprize: https://docs.corda.r3.com/database-management.html.
In Corda Opensource it is suggested to create several mapped schemas on java side.
And on Corda enterprise it is mentioned that liquibase scripts are used to modify database part.
Are two of the options mutually exclusive? I.e. if I use liquibase to update schema there is no need to add several mapped schemas?
And if I use MappedSchemas in java side, I do not need the liquibase scripts?
Liquibase support is added only in Enterprise. To create tables in Corda Enterprise, you need to add Liquibase scripts which supports automated database versioning.
Liquibase is not supported in Corda Open source. In Corda open source you will define your tables as Hibernate JPA entity. The table gets created in the database as a Hibernate entity. Even if you add Liquibase script in Open Source, it will be ignored and Hibernate entity will be created instead.
Liquibase is added in Corda Enterprise which helps developers write database agnostic scripts and helps them with automated database migration/versioning.
Hope that helps.
I'm planning to work on a social site and I would like to leverage both a document and graph database for all of the desired features. Is there a way to get Meteor.js or Sail.js (or any better) to work with ArangoDB or OrientDB? Or should I just stick with the bundled MongoDB and integrate something like allegrograph DB?
Sails.js has support for both of the databases you mention:
https://www.npmjs.com/package/sails-orientdb
https://github.com/rosmo/sails-arangodb
In addition to MongoDB, Postgres, and dozens of others.
Sails.js is a classic mvc client-server web application framwork, basically its ruby on rails implemented for node.js + webscockets, so mostly all you need to make it work with any backend database is make changes to the orm.
Meteor is a very different beast, it is a very opinionated realtime end to end web framework including client server and database, by behing very very opinionated it solves many of the common issues in realtime application, where you need to implement a mechanisms for very quickly updating all your clients of each others actions and take care of things like latency compensation, data collision resolution, and real time client version managment, This is implemented by using web sockets and the mongoDB's write ahead logging for triggres of data updates, making meteor somewhat coupled with mongo.
But you can make orientdb work pretty well with meteor using the new orientDB live query api. It is a pubsub implementation for query results, and can be used for efficent updates pushed from the db through the server directly to the client with very little overhead on the server. This is far from production ready and only currently works on the orient db 2.1 rc5 version.
I have implemented a small meteor demo application as an example https://github.com/imdark/meteor-orientdb-demo
Please check on Meteorpedia the Alternative Database Post, they mention neo4j-livedata and minineo4j.
Here is the Atmosphere package: ostrio:neo4jdriver
Is there a specific economic or technological reason why you consider not to use the very well integrated mongoDB as the database of choice?
In addition to Travis answer I also recommend waterline-orientdb for Sails.js.
I'am new to symfony, even more to symfony cmf. I have project idea and want to get started, but as I'am reading documentation I get more and more confused.
What I need to build is CMS with tree like structure routes and multilingual support for those routes. However I'm confused with this PHPCR stuff as it's new to me and I don't wan't to install java to my server, does that means, I can't use CMF?
I read of Doctrine ORM solution, but didn't find example, clear documentation and there's also 2 more concepts, I can't figure out:
doctrine / phpcr-odm
jackalope / jackalope-doctrine-dbal
How different they are or maybe they complement each other?
So to summrize the question: If someone could explain me PHPCR, PHPCR-ODM, doctrine-dbal, and tell me can I create CMS using CMF and only MySQL database (I saw note that it's possible load routes from DB) and how would one should approach this problem?
The PHPCR story is a bit different from what you know from other DB storage systems. That can cause confusion, so let me explain the concepts behind it.
The basic flow chart can be represented as this:
The Application layer is the PHP code that you have written. To put some data in PHPCR, you create a new node (which is like a row in a MySQL db) and inject that into the PHPCR layer. This layer communicates with a jackalope connection, which is bounded to the DB.
If you are using the Doctrine PHPCR-ODM, there is a new layer between the Application layer and the PHPCR layer. You will not use the PHPCR directly, you'll only use it through this Doctrine layer.
The Jackalope layer can have multiple different ways for different DB layers. By now, there are 2 options for the Jackalope layer: Jackrabbit or Doctrine DBAL.
Using the Jackrabbit option, you communicate through Jackalope with a JAVA Jackrabbit DB system. This is the most powerfull, feature-rich and properbly the quickest option.
You can also choose for using Doctrine DBAL. This Jackalope adapter will use the Doctrine DBAL layer to communicate with the DB. Doctrine DBAL can work with most of the relational databases (SQLite, MySQL, Oracle, etc.).
Almost all examples from the Symfony CMF use the Doctrine DBAL version, as it's easier to set-up if you are new into the PHPCR world. Just look at the documentation, sandbox or standard edition for examples.
Looking for a good embedded db for my asp.net apps while trying to avoid SQLExpress (I need it to be a downloable file(s) with no need to install at server), I found Firebird. But:
According to this:
http://en.wikipedia.org/wiki/Embedded_database#Firebird_Embedded
It has the same features as the classic and superserver version of Firebird, except that two or more THREADS (not just applications) cannot access the same database at the same time. So Firebird embedded acts as a local server for a single threaded client accessing its databases (that means it doesn't work properly for ASP.NET web applications)
According to this http://www.firebirdsql.org/en/development-net-provider/, however, there are some ASP.NET providers released.
Weekly builds of the ADO.NET Data Provider, the ASP.NET Web Providers and the DDEX provider can be found here.
So the question is: is it or is it not a good embedded db alternative to use in asp.net?
If not, what would you recommend instead?
I have fixed the wikipedia article , firebird 2.5 embedded is fully multithreaded and it is fully supported for asp.net
http://blog.cincura.net/231742-firebird-embedded-in-comparison-to-sql-server-compact-edition-4/
Also from what i have read on jiri's blog it is possible to run it on azure
http://blog.cincura.net/232332-using-firebird-inside-azure-without-vm-role/
and on amazon
http://blog.cincura.net/232333-amazons-ec2-micro-instance-and-firebird/
Yes, it is. And I believe it is one of your best options.
Specially because you will be running it in a non MS environment. I know PostgreSQL is a good Open Source DB, but it does not have an embedded version.
Your other option is SQLite.
One thing that might be worth looking at is SQL Compact. The latest version works with ASP.NET and runs in-process. All you need to deploy is a couple of DLLs.
I must confess I don't really know anything about Firebird so can't compare it directly.