在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:db4o-gpl开源软件地址:https://gitee.com/iboxdb/db4o-gpl开源软件介绍:The Basic Principle of db4odb4o is a non-intrusive persistence system that stores any complex object with one single line of code. The class schema of your application classes is analysed and adjusted in real time when objects are stored. Object-oriented querying functionality is provided through Native Queries (NQ), the ability to query the database using .NET syntax and semantics (similar in concept to LINQ/DLINQ), Query by Example (QBE) which uses prototype objects for querying and other APIs. High performance is achieved with indexed fields and by reducing database-file-internal redirections to the absolute minimum. db4o features ACID transactions, fast embedded single-user mode and multi-transactional Client/Server access, locally and through TCP, object-oriented replication, and the ObjectManager to browse database files. Download Object Manager Binaries to TRY Db4o-GPL .NetStandard2.0 & Java7+ VersionNot as complexity as big SQL database server, not as simplicity as iBoxDB, Db4o is the best database project to help you to learn how to write a database. This adventurous oop-database project, has no news in a long time.here update it to .NetStandard2 & Java7. some users maybe need it. DotNet CoreUse MonoDevelop to Open Db4o-2010.sln or run Db4objects.Db4o.Optional/dotnet publish -c Releasetest/dotnet run /test includes a dotnet core example. JAVA 7Use IDE NetBeans 11 to Open db4o.j/db4o-core project Build Project will output a jar to ../db4o-gpl/db4o.j/db4o-core/dist/db4o-core.jar or Run File, db4o.j/db4o-core/tutorial/src/com/db4odoc/f1/Main.java XamarinDb4o-Projects/*/dotnet publish -c Release //like aboveAdd 4 DLLs in /Output to xamarin-projectvar path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);string dbpath = Path.Combine(path, "x.db");db = Db4oEmbedded.OpenFile(dbpath);Project Properities->Android Options->Linking->"Sdk Assemblies Only" (not "Sdk and User Assemblies").Permission: Read/Write_External_Storage, INTERNET Android Java// <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>// <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>// <uses-permission android:name="android.permission.INTERNET"/>private class Async extends android.os.AsyncTask{ @Override protected Object doInBackground(Object... arg) { //Path //android.os.Environment.getDataDirectory().getAbsolutePath() // + "/data/" + "com.example.fapp" + "" //DB4O Code here return null; }}new Async().execute(null); Download Assemblies Directly.NET TutorialsObject-oriented database programming with db4o API.NET Docs Db4oEmbeddedJAVA Docs Db4oEmbeddedAbout UpdateDepthExamples.NET ExampleJAVA ExampleOne Local Share Connection ObjectContainer db = Db4oEmbedded.openFile(Db4oEmbedded .newConfiguration(), DB4OFILENAME); Multiple Local Connections ServerConfiguration config = Db4oClientServer.newServerConfiguration();//https://iboxdb.github.io/db4o-gpl-doc/javadoc/com/db4o/config/CommonConfiguration.html#updateDepth(int)config.common().objectClass(Car.class).updateDepth(5);//https://iboxdb.github.io/db4o-gpl-doc/javadoc/com/db4o/cs/Db4oClientServer.html#openServer(com.db4o.cs.config.ServerConfiguration,java.lang.String,int)//Set Port = 0ObjectServer server = Db4oClientServer.openServer(config, DB4OFILENAME, 0);try { ObjectContainer client = server.openClient(); // Do something with this clients client.close();} finally { server.close();}//Open new Client for every request. Concurrentpublic static void queryLocalServer(ObjectServer server) { ObjectContainer client = server.openClient(); listResult(client.queryByExample(new Car("885588"))); client.close();} Multiple Remote Connections //set PORT > 0ObjectServer server = Db4oClientServer.openServer(Db4oClientServer .newServerConfiguration(), DB4OFILENAME, PORT);server.grantAccess(USER, PASSWORD);try { ObjectContainer client = Db4oClientServer.openClient( Db4oClientServer.newClientConfiguration(), "localhost",PORT, USER, PASSWORD); // Do something with this client, or open more clients client.close();} finally { server.close();} Java Lambda Index var rs = see.query((Record r) -> r.indexField == dv); Lambda index. FieldName on the left, enable index; on the right, disable index. Getting Startedpublic class Node{ [Indexed] public String Name; public Node Left; public Node Right;} StringBuilder sb = new StringBuilder();var path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);path = Path.Combine(path, "t.db");File.Delete(path);var cf = Db4oEmbedded.NewConfiguration();cf.Common.Add(new TransparentActivationSupport());cf.Common.Add(new TransparentPersistenceSupport());using (var oc = Db4oEmbedded.OpenFile(cf, path)){ using (var ss = oc.Ext().OpenSession()) { Node root = new Node(); root.Name = "Root"; root.Left = new Node(); root.Left.Name = "LEFT"; root.Left.Left = new Node(); root.Left.Left.Name = "LEFT.LEFT"; ss.Store(root); ss.Commit(); } using (var ss = oc.Ext().OpenSession()) { sb.AppendLine(ss.QueryByExample(new Node { Name = "Root" }).First().Left.Left.Name); }} Object ManagementUse NetBeans-11 with Java on Linux build 'db4o.j/db4o-core' project, get db4o-core.jaruse NetBeans open db4o-gpl/admins/om.j/ObjectManager/ build and run Use MonoDevelop-7.8.4+ with Mono-6 on Linux Db4o-Projects/*/dotnet publish -c Release, get db4o DLLsuse MonoDevelop open db4o-gpl/admins/om.net/OMAddin-2010.sln build and run See the result, images/db4o_gpl.png See the result, images/db4o_java_gpl.png License: GPL , as MySQL. The info from the author.http://supportservices.actian.com/versant/default.html db4oWith regret we have to announce that Actian decided not to actively pursue and promote the commercial db4o product offering for new customers any longer.Since the db4o dual licensing model allows for the free usage of the community edition of db4o for non-commercial purposes, you have the opportunity to continue to use it for your non-commercial applications oreven fork it to provide support for the community.You can find the latest installer packages including the source tarball here for Java, .NET35, .NET40Actian will continue to provide commercial licenses and support for existing customers with active support contract. |
请发表评论