<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ObjectBox.io</title>
    <description>The latest articles on DEV Community by ObjectBox.io (@objectbox_io).</description>
    <link>https://dev.to/objectbox_io</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F227772%2Fb7b7c2f0-3745-40ec-92d8-496e00fca416.jpg</url>
      <title>DEV Community: ObjectBox.io</title>
      <link>https://dev.to/objectbox_io</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/objectbox_io"/>
    <language>en</language>
    <item>
      <title>Flutter Databases: 2023 review</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Mon, 05 Jun 2023 14:06:51 +0000</pubDate>
      <link>https://dev.to/objectbox/flutter-databases-2023-review-3g2m</link>
      <guid>https://dev.to/objectbox/flutter-databases-2023-review-3g2m</guid>
      <description>&lt;p&gt;As Flutter is regarded as one of the &lt;a href="https://survey.stackoverflow.co/2022/ther-frameworks-and-libraries"&gt;most loved mobile frameworks of 2022&lt;/a&gt;, the Flutter database scene is thriving too. With an ever-growing market that does not seem to be slowing down, it might be difficult to decide on what database you should use. You can find anything you want from packages that provide plugins to familiar relational databases (Sqflite), to light-weight and high-performance NoSQL databases (&lt;a href="https://pub.dev/packages/objectbox"&gt;ObjectBox&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you consider when choosing a Flutter database?
&lt;/h2&gt;

&lt;p&gt;There are a number of factors that you should keep in mind when selecting a database for your flutter project. Although what factors are important to you might differ depending on your particular project, there are a few indicators that are invaluable no matter the app you are building. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; Performance is a crucial factor when selecting a database. It not only &lt;a href="https://objectbox.io/connecting-database-performance-and-business-value/"&gt;makes sure you have data when you need it&lt;/a&gt;, it saves costs and avoids downtime. For example, a strong response rate on a website can go as far as sales: &lt;a href="https://unbounce.com/page-speed-report/"&gt;70% of respondents in a study noting that page speed impacts their willingness to buy from an online retailer&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease-of-use:&lt;/strong&gt; With constant pressure to deliver new apps and / or features, most developers care a lot about the eas-of-use. Depending on your skills or the team’s skill set, choosing a database that comes with native-language APIs that are intuitive to use, will save you a lot of time and nerves short-and longterm. While &lt;a href="https://www.tiobe.com/tiobe-index/"&gt;SQL is still a popular language&lt;/a&gt;, it is an additional skill needed, and inot a great match for object-oriented code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Even though a project may not have a lot of requirements at the moment, it can grow quickly. Having a database that ensures a capacity to grow with your data and user base can be vital to ensure long-term success. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Sync:&lt;/strong&gt; Local databases are great, but sometimes you need your data to &lt;a href="https://objectbox.io/what-is-data-synchronization-how-to-keep-data-in-sync/"&gt;sync between systems that are far from each other&lt;/a&gt;. You also need to automate an update process that maintains consistency in order to meet your business needs. Almost every mobile application will need data synchronization, but it takes a lot of time as well as introduces a lot of risk. A database that comes with a Sync solution out of the box is a no-brainer in this regard. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  {Aside: a word about data sync}
&lt;/h3&gt;

&lt;p&gt;If data-synchronization is your priority, ObjectBox Sync is a next-gen solution equipped to manage data flows and harmonize data across devices, offline as well as online. &lt;a href="https://objectbox.io/sync/"&gt;Discover the easy to use alternative for syncing data&lt;/a&gt; – and simply rely on the data being available where you need it when you need it. Sync is a transactionally safe way of making the data sets you select reliably available in a highly efficient way. &lt;/p&gt;

&lt;h2&gt;
  
  
  What kind of databases exist?
&lt;/h2&gt;

&lt;p&gt;Databases can be classified into various types. The most significant differentiations for our purposes include non-relational (NoSQL) versus relational (SQL) databases, cloud databases versus edge databases, and embedded versus in-memory databases. However, databases can also be distinguished based on additional criteria such as supported data types and scalability, although definitions may vary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is an ORM a database?
&lt;/h2&gt;

&lt;p&gt;An Object Relational Mapper (ORM) is not a database itself but rather a layer that sits on top of a database, simplifying its usage. This is particularly relevant when working with relational databases (SQL) and object-oriented programming languages like Dart. It helps bridge the gap between the object-oriented nature of the programming language and the relational structure of the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flutter database landscape in 2023
&lt;/h2&gt;

&lt;p&gt;Let's introduce the key players in the current Flutter database market:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/SQLite"&gt;Sqflite&lt;/a&gt; serves as a wrapper around SQLite, a relational database that lacks direct support for Dart objects.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://drift.simonbinder.eu/"&gt;Drift&lt;/a&gt; (formerly known as Moor) is an ORM built on top of SQLite, which itself is a well-established lightweight relational (SQL) database.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pinchbv.github.io/floor/"&gt;Floor&lt;/a&gt; is another ORM that utilizes SQLite as its underlying database.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://isar.dev/"&gt;Isar&lt;/a&gt; is a fast and lightweight NoSQL database developed by the author of Hive.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/tekartik/sembast.dart/tree/master/sembast"&gt;Sembast&lt;/a&gt; is a NoSQL database.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Realm_(database)"&gt;Realm&lt;/a&gt; is a lightweight NoSQL database primarily written in Java, which was acquired by Mongo DB in 2019.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/objectbox/objectbox-dart"&gt;ObjectBox&lt;/a&gt; is a highly performant lightweight NoSQL database with integrated data synchronization capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: Since Hive is expected to be deprecated according to its author, we will focus on Isar as the recommended alternative in this discussion.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package name&lt;/th&gt;
&lt;th&gt;Package Description&lt;/th&gt;
&lt;th&gt;Data Model&lt;/th&gt;
&lt;th&gt;Data Sync&lt;/th&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;sqflite&lt;/td&gt;
&lt;td&gt;SQLite plugin for Flutter&lt;/td&gt;
&lt;td&gt;relational&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drift&lt;/td&gt;
&lt;td&gt;ORM on top of SQLite&lt;/td&gt;
&lt;td&gt;relational&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Floor&lt;/td&gt;
&lt;td&gt;ORM on top of SQLite&lt;/td&gt;
&lt;td&gt;relational&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Isar&lt;/td&gt;
&lt;td&gt;Lightweight NoSQL database&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sembast&lt;/td&gt;
&lt;td&gt;NoSQL database, fully document-based&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Realm&lt;/td&gt;
&lt;td&gt;NoSQL database&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;Yes, but MongoDB Atlas and Cloud are needed&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ObjectBox&lt;/td&gt;
&lt;td&gt;Lightweight NoSQL database + Sync&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How to choose the best Flutter database?
&lt;/h2&gt;

&lt;p&gt;In conclusion, the Flutter database market is a dynamic and evolving landscape, with new options continually emerging. Choosing the best database option for a Flutter project requires careful consideration of specific project requirements and objectives. In this article, we have reviewed the top options currently available so that you can have a handy reference to the most important tech features. We encourage you to stay informed and check for updates on pub.dev, as well as contribute to the community.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>database</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Picking a Database for Embedded Systems</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Thu, 30 Jun 2022 12:46:00 +0000</pubDate>
      <link>https://dev.to/objectbox/embedded-databases-what-is-an-embedded-database-and-how-to-choose-one-27m8</link>
      <guid>https://dev.to/objectbox/embedded-databases-what-is-an-embedded-database-and-how-to-choose-one-27m8</guid>
      <description>&lt;h2&gt;
  
  
  Exploring Today's Embedded Database Marketplace
&lt;/h2&gt;

&lt;p&gt;With the increasing demand for higher computing capabilities, embedded databases are becoming more important in today's technological landscape. The market for embedded systems is &lt;a href="https://www.verifiedmarketresearch.com/product/embedded-systems-market/" rel="noopener noreferrer"&gt;expected to grow from USD 100.33 billion in 2020 to USD 137.7 billion by 2028&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Embedded" in the database world
&lt;/h3&gt;

&lt;p&gt;The term "embedded" can have two different meanings when talking about databases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;"&lt;strong&gt;&lt;a href="https://www.techopedia.com/definition/30660/embedded-database" rel="noopener noreferrer"&gt;Embedded database&lt;/a&gt;&lt;/strong&gt;" means that the database is deeply integrated into the software and does not require a server. Also known as an "embedded database management system”( or embedded DBMS for short)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A "&lt;strong&gt;database for embedded systems&lt;/strong&gt;" is a database designed specifically for use in embedded systems. These are systems made up of tightly integrated hardware and software, such as electronic control units (ECUs), Internet of Things (IoT) devices, or smartphones. A database for such systems must be small and optimised to run on low-resource hardware (e.g. restricted CPU, memory, battery). In these use cases, a high-performance database is usually a top priority to get the most out of these restricted devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The fact that these terms are used interchangeably may cause some confusion. Not all embedded databases are appropriate for use in embedded systems, and databases used in embedded systems are not necessarily embedded in software. Maintaining a clear distinction between these terms is therefore important. &lt;/p&gt;




&lt;h2&gt;
  
  
  So, What is an Embedded System Exactly?
&lt;/h2&gt;

&lt;p&gt;Embedded systems are ubiquitous today. They are used in most industries, ranging from &lt;a href="https://objectbox.io/iiot-edge-computing/" rel="noopener noreferrer"&gt;manufacturing&lt;/a&gt; and &lt;a href="https://objectbox.io/iot-edge-computing-and-digitalization-in-healthcare/" rel="noopener noreferrer"&gt;healthcare&lt;/a&gt;, to &lt;a href="https://objectbox.io/connected-car-data-storage-and-sync/" rel="noopener noreferrer"&gt;automotive&lt;/a&gt; and consumer electronics. An embedded system is essentially a collection of hardware and software components that are designed to process and control the system's specific tasks. These components include processors, controllers, input-output devices, outer peripheral devices, and many others. Embedded systems are typically limited in terms of CPU, power, memory, and connectivity (WiFi, Bluetooth, ZigBee, and so on). The definition, however, is not linked to hardware constraints, and the landscape is generally heterogeneous.&lt;/p&gt;

&lt;p&gt;Embedded systems are frequently components of larger systems, and each embedded system performs a limited number of specific functions within the larger system. Embedded systems, in essence, form a complex decentralised system. ECUs (in cars)smartphones, microcontrollers, cameras, smart watches, ATMs, robots, sensors and many more are examples of embedded systems.&lt;/p&gt;




&lt;h3&gt;
  
  
  Edge Databases: “Embedded Database” AND “Database for Embedded Systems”
&lt;/h3&gt;

&lt;p&gt;Because embedded systems frequently have limited resources and are often found in decentralised systems with limited bandwidth, or intermittent or no connectivity , the efficiency and footprint of the local storage alongside smart and efficient data synchronisation are critical. These requirements spawned a new market for databases designed specifically for embedded systems. Embedded databases may often be useful in embedded systems due to their light weight and high performance. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7fvqco7bhflpuubrv5m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7fvqco7bhflpuubrv5m.jpeg" alt="Venn Diagram describing the intersecting space Edge Databases are the most impactful"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://objectbox.io/what-is-an-edge-database-and-why-do-you-need-one/" rel="noopener noreferrer"&gt;Edge Databases&lt;/a&gt; are typically embedded databases optimised for resource efficiency on restricted decentralised devices (typically embedded devices) with limited resources. New Edge databases solve the challenge of an insanely growing number of decentralised embedded devices, both in the professional / industrial as well as the consumer world. Edge Databases solve data synchronisation out-of-the-box, making the data from these devices easily and efficiently accessible. &lt;/p&gt;




&lt;h2&gt;
  
  
  Why Would You Use an Edge Database in an Embedded System?
&lt;/h2&gt;

&lt;p&gt;To begin with, local data storage enabled by embedded databases is a significant benefit for typical embedded systems that frequently face connectivity issues (due to device, use case, data protection needs, location, or costs) or operate in real-time scenarios (e.g., on the factory floor or in the car). Because of the limited connectivity or real-time requirements that these systems frequently face, they cannot always be relied on to retrieve data from the cloud. Instead, a clever solution is to keep data on the device locally and only sync it with other parts of the system when necessary and possible. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In addition to handling a lot of data, embedded systems frequently operate with erratic or intermittent connections. So, an &lt;a href="https://objectbox.io/sync/" rel="noopener noreferrer"&gt;effective synchronisation solution&lt;/a&gt; should not only sync data whenever a connection is available but empower the developers to choose which data to synchronise when and, moreover, do so as efficiently as possible (minimising data traversal, enhancing speed). For instance, differential sync is effective because it reduces network costs and unnecessary energy use (and thus CO2 emissions) by only sending changes to the server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The two most important features of databases in embedded systems are performance and reliability. A database designed for use in embedded systems should perform well on devices with limited CPU and memory. This is why embedded databases may perform well in embedded systems; they are largely designed to function in such environments. Because some of them are truly tiny, they thrive in small applications. While improving performance helps to eliminate some risks, it does not help with unexpected power outages. Therefore, a good data recovery procedure is also important.&lt;/p&gt;

&lt;p&gt;Let's have a look at the features of embedded databases that make them a great choice for embedded systems.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Benefits of Embedded Databases
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;High performance&lt;/strong&gt;: True embedded databases benefit from a simpler architecture because they don't require a separate server module. Although the client/server architecture benefits from the server's ability to be installed on a more powerful computer, there is an inherent risk that also rises. By removing the client/server communication layer, you can reduce complexity and improve performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability&lt;/strong&gt;: Because many embedded devices run on battery power, a power outage is a possibility. As a result, the data management solution should be designed to ensure that data is completely recovered in the event of a power outage. This is a popular feature of embedded databases designed specifically for embedded systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of use and low maintenance&lt;/strong&gt;:  Another significant advantage of using an embedded database is its ease of implementation and small support requirements. Because designing embedded devices frequently necessitates working under time constraints, choosing an out-of-the-box data persistence solution is the best option for many projects. Because embedded databases are directly embedded in the application, they do not require administration and can manage themselves effectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small footprint&lt;/strong&gt;: Embedded databases aren't always small, but some are as small as 1 MB, making them ideal for mobile and IoT devices with limited memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: As the number of embedded devices grows, so does the volume of data. A good solution should be able to handle large amounts of data as well as adapt to new device features and easily change to meet the needs of a new device. Rigid database schemas fall short in this regard.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  How to Choose an Embedded Database
&lt;/h3&gt;

&lt;p&gt;The following are the most important factors to consider when selecting an embedded database: ACID (atomicity, consistency, isolation, durability) compliance, CRUD performance, footprint, and data sync.&lt;/p&gt;

&lt;h4&gt;
  
  
  An In-Depth Examination of the Embedded Database Market
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Database solution&lt;/th&gt;
&lt;th&gt;Primary model&lt;/th&gt;
&lt;th&gt;Minimum footprint&lt;/th&gt;
&lt;th&gt;Sync&lt;/th&gt;
&lt;th&gt;Languages&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/Berkeley_DB" rel="noopener noreferrer"&gt;Berkeley DB&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;NoSQL database; key-value store&lt;/td&gt;
&lt;td&gt;&amp;lt;2MB&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C++, C#, Java, Perl, PHP, Python, Ruby, Smalltalk and Tcl&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.couchbase.com/products/lite" rel="noopener noreferrer"&gt;Couchbase Lite&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;NoSQL DB; document store&lt;/td&gt;
&lt;td&gt;1-5MB&lt;/td&gt;
&lt;td&gt;Sync needs a Couchbase Server&lt;/td&gt;
&lt;td&gt;Swift, Objective-C, Java (Android), Java (Non-Android), Kotlin, C#, JavaScript, C&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;extremeDB&lt;/td&gt;
&lt;td&gt;In-memory relational DB, hybrid persistence&lt;/td&gt;
&lt;td&gt;&amp;lt; 1 MB&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C, C#, C++, Java, Lua, Python, Rust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database" rel="noopener noreferrer"&gt;LMDB&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Key-value store&lt;/td&gt;
&lt;td&gt;&amp;lt;1MB&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C++, Java, Python, Lua, Go, Ruby, Objective C, Javascript, C#, Perl, PHP, etc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.mongodb.com/realm" rel="noopener noreferrer"&gt;Mongo Realm&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Object-oriented NoSQL database&lt;/td&gt;
&lt;td&gt;5 MB+&lt;/td&gt;
&lt;td&gt;Sync only via Mongo Cloud&lt;/td&gt;
&lt;td&gt;Swift, Objective-C, Java, Kotlin, C#, and JavaScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://objectbox.io" rel="noopener noreferrer"&gt;ObjectBox&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Object-oriented NoSQL database&lt;/td&gt;
&lt;td&gt;&amp;lt;1MB&lt;/td&gt;
&lt;td&gt;Offline Sync, on-premise Sync, Cloud Sync, p2p Sync is planned&lt;/td&gt;
&lt;td&gt;C,C++, Java, Kotlin, Swift, Go, Flutter / Dart, Python&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://en.wikipedia.org/wiki/RocksDB" rel="noopener noreferrer"&gt;RocksDB&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Key-value store&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C++, C, Java, Python, NodeJS, Go, PHP, Rust, and others&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.sqlite.org/index.html" rel="noopener noreferrer"&gt;SQLite&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Relational&lt;/td&gt;
&lt;td&gt;&amp;lt;1MB&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C/C++, Tcl, Python, Java, Go, MATLAB, PHP, and more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UnQLite&lt;/td&gt;
&lt;td&gt;NoSQL; document &amp;amp; key-value store&lt;/td&gt;
&lt;td&gt;~ 1.5 MB&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;C/C++, Python&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Selecting an Embedded Database
&lt;/h2&gt;

&lt;p&gt;Several factors must be considered when &lt;a href="https://greenrobot.org/news/mobile-databases-sqlite-alternatives-and-nosql-for-android-and-ios/" rel="noopener noreferrer"&gt;selecting a database&lt;/a&gt; for an embedded system. On highly restricted devices, even small changes in one of these parameters can have a big impact. Even minor variations in one of these parameters can have a significant impact on highly restricted devices. While developing your own solution with a specific device in mind may be feasible, the additional effort and tight deadlines usually do not justify this decision. This is why we recommend using a database, such as ObjectBox, which is designed for embedded system specifics with the added bonus of &lt;a href="https://objectbox.io/what-is-data-synchronization-how-to-keep-data-in-sync/" rel="noopener noreferrer"&gt;an efficient data sync solution&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are several embedded databases that work well on embedded devices. Each has advantages and disadvantages, so you must decide which is best for your application. However, if you have a use case where performance is especially important, ObjectBox &lt;a href="https://objectbox.io/android-database-java-kotlin-3-0-benchmarks/" rel="noopener noreferrer"&gt;outperforms all competitors&lt;/a&gt; across all CRUD operations (Create, Read, Update, Delete). ObjectBox is a next-generation infrastructure software for Edge Computing. In addition to fast local data storage, it enables decentralised secure data flows and combines flexible data management with on-device security. You can assess it for yourself by looking at our GitHub profile and &lt;a href="https://github.com/objectbox/objectbox-performance" rel="noopener noreferrer"&gt;performance benchmarks&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>discuss</category>
      <category>database</category>
      <category>community</category>
    </item>
    <item>
      <title>Database for syncing cross platform</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Fri, 25 Mar 2022 12:10:14 +0000</pubDate>
      <link>https://dev.to/objectbox/database-for-syncing-cross-platform-i85</link>
      <guid>https://dev.to/objectbox/database-for-syncing-cross-platform-i85</guid>
      <description>&lt;h2&gt;
  
  
  How Data Sync works - quick video demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=Feiq46u3hH0" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2FFeiq46u3hH0%2F0.jpg" alt="cross platform sync c++ example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ObjectBox Database + Data Sync is a Mobile and IoT solution for fast and effortless data access using Edge Computing. Our easy native APIs (&lt;a href="https://docs.objectbox.io/" rel="noopener noreferrer"&gt;Java, Kotlin&lt;/a&gt;, &lt;a href="https://pub.dev/packages/objectbox" rel="noopener noreferrer"&gt;Flutter / Dart&lt;/a&gt;, &lt;a href="https://cpp.objectbox.io/" rel="noopener noreferrer"&gt;C / C++&lt;/a&gt;, &lt;a href="https://swift.objectbox.io/" rel="noopener noreferrer"&gt;Swift&lt;/a&gt;, &lt;a href="https://golang.objectbox.io/" rel="noopener noreferrer"&gt;Golang&lt;/a&gt;) are built for cross platform development. &lt;a href="https://github.com/objectbox" rel="noopener noreferrer"&gt;The ObjectBox database can be set up in minutes, and is also free and easy to use&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This tutorial will show you how to set up ObjectBox Sync in C++, Go and Java, and then sync data between three instances of an example app. The app we are going to use is for managing a to-do list, its functionality is very simple. User can add tasks to the list and mark them as done, while ObjectBox takes care of syncing this data across platforms. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: if you haven't used ObjectBox DB yet, here are the docs for each language binding: &lt;a href="https://docs.objectbox.io/" rel="noopener noreferrer"&gt;Java/Kotlin&lt;/a&gt;, &lt;a href="https://cpp.objectbox.io/" rel="noopener noreferrer"&gt;C/C++&lt;/a&gt;, &lt;a href="https://docs.objectbox.io/" rel="noopener noreferrer"&gt;Flutter/Dart&lt;/a&gt;, &lt;a href="https://golang.objectbox.io/" rel="noopener noreferrer"&gt;Go&lt;/a&gt;, &lt;a href="https://swift.objectbox.io/" rel="noopener noreferrer"&gt;Swift&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A couple of notes about the example
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To follow this tutorial, you need to get your own copy of the Sync Server (available as an executable for Linux and as a Docker container). &lt;a href="https://objectbox.io/sync/" rel="noopener noreferrer"&gt;You can apply for a free Sync Trial here&lt;/a&gt;. You will only need to start the server once, but we included a step about it in for all three examples. Skip those if you already have a server running.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As this is just an example, we opted for no authentication to make things simple. This is not what you would use in production. We currently offer two authentication methods: shared secret and Google Sign-In. &lt;a href="https://sync.objectbox.io/sync-client#authentication-options" rel="noopener noreferrer"&gt;Here is the section about authentication options in the Sync docs&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If building your own solution, you will have to make sure that the UIDs in the model JSON file are the same across all of your apps. &lt;a href="https://docs.objectbox.io/advanced/meta-model-ids-and-uids" rel="noopener noreferrer"&gt;More details about UIDs in the Sync docs&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to run the example apps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  C++ example app
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/objectbox/objectbox-c/tree/main/examples/cpp-gen-sync" rel="noopener noreferrer"&gt;Example code repository&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Video tutorial
&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=PDSXPVHgC4Y" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2FPDSXPVHgC4Y%2F0.jpg" alt="cross platform sync c++ example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Requirements
&lt;/h4&gt;

&lt;p&gt;New to C++? &lt;a href="https://dev.to/objectbox/how-to-get-started-with-objectbox-database-4eo4"&gt;Here is our tutorial covering the installation basics&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WSL Ubuntu&lt;/li&gt;
&lt;li&gt;CMake&lt;/li&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;C++&lt;/li&gt;
&lt;li&gt;Clang&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step-by-step
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Create CMakelists.txt:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include(FetchContent) 
FetchContent_Declare( 
objectbox 
GIT_REPOSITORY https://github.com/objectbox/objectbox-c.git 
GIT_TAG v0.15.2 
) 

FetchContent_MakeAvailable(objectbox) 

add_executable(myapp main.cpp) 
target_link_libraries(myapp objectbox-sync)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Configure and build the project using CMake: Configure (Clang), and then CMake: Build.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[if not running a server already] Start the ObjectBox Sync Server on Linux by running &lt;code&gt;./sync-server --model build/_deps/objectbox-src/examples/cpp-gen/objectbox-model.json --unsecured-no-authentication&lt;/code&gt;, where &lt;code&gt;sync-server&lt;/code&gt; is the path to your sync server executable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now launch &lt;code&gt;objectbox-c-examples-cpp-gen-sync&lt;/code&gt;, and the Sync Client will start automatically. You can see how it was implemented in main.cpp.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a new task (e.g. &lt;code&gt;new task-cpp-1&lt;/code&gt;), and open the Admin UI to check if the tasks appears there. To do this, just type &lt;a href="http://127.0.0.1:9980/" rel="noopener noreferrer"&gt;http://127.0.0.1:9980/&lt;/a&gt; in any web browser.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Go example app
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/objectbox/objectbox-go/tree/main/examples/tasks" rel="noopener noreferrer"&gt;Example code repository&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Video tutorial
&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=kLrqRl80qvs" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2FkLrqRl80qvs%2F0.jpg" alt="cross platform sync c++ example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Requirements
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Go (see how to configure it for VS Code &lt;a href="https://docs.microsoft.com/en-us/azure/developer/go/configure-visual-studio-code" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step-by-step
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Clone the &lt;code&gt;objectbox-go&lt;/code&gt; repository to your VS Code project. Make sure the current directory is &lt;code&gt;objectbox-go&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This app is actually two examples in one: with sync and without. To run the one with sync, we need to enable the Task object for syncing: simply put &lt;code&gt;// objectbox:"sync"&lt;/code&gt; on a new line in examples/tasks/internal/model/task.go.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now we need to update the ObjectBox schema by running the generator: &lt;code&gt;go generate examples/tasks/internal/model/task.go&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[if not running a server already] Now start the ObjectBox Sync Server: &lt;code&gt;./sync-server --model=examples/tasks/internal/model/objectbox-model.json --unsecured-no-authentication&lt;/code&gt;, where &lt;code&gt;sync-server&lt;/code&gt; is the path to your sync server file. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;go run examples/tasks/main.go&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a task (e.g. &lt;code&gt;new task-go&lt;/code&gt;) and verify that it synced correctly with the server. Simply open &lt;a href="http://127.0.0.1:9980/" rel="noopener noreferrer"&gt;http://127.0.0.1:9980/&lt;/a&gt; in a  web browser.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Java (Andorid) example app
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/objectbox/objectbox-examples/tree/main/android-app-sync" rel="noopener noreferrer"&gt;Example code repository&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Requirements
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;Android Studio&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step-by-step
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open Android Studio and go to File → New → Project from Version Control to clone the &lt;code&gt;objectbox-examples&lt;/code&gt; repository. Use this URL: &lt;a href="https://github.com/objectbox/objectbox-examples.git" rel="noopener noreferrer"&gt;https://github.com/objectbox/objectbox-examples.git&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[if not running a server already] Start the ObjectBox Sync Server: &lt;br&gt;
&lt;code&gt;./sync-server --model android-app-sync/objectbox-models/default.json --unsecured-no-authentication&lt;/code&gt;, where &lt;code&gt;sync-server&lt;/code&gt; is the path to your sync server file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run “android-app-sync” on a device of your choice. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a new task called, e.g. “task-java”. Open the Admin UI to check if the task appears there: &lt;a href="http://127.0.0.1:9980/" rel="noopener noreferrer"&gt;http://127.0.0.1:9980/&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Now it's your turn. Build your own cross platform app using any combination of the supported languages. Don't forget to go the &lt;a href="https://sync.objectbox.io/" rel="noopener noreferrer"&gt;Sync docs&lt;/a&gt; when doing so. They cover all aspects that we've presented today in more detail.&lt;/p&gt;

&lt;p&gt;We'd love to see what you've built with ObjectBox DB + Sync! Share your apps with us on Social Media by tagging &lt;a class="mentioned-user" href="https://dev.to/objectbox_io"&gt;@objectbox_io&lt;/a&gt;, or just send us an email on contact[at]objectbox.io. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to get started with ObjectBox database in C++</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Thu, 03 Mar 2022 14:28:37 +0000</pubDate>
      <link>https://dev.to/objectbox/how-to-get-started-with-objectbox-database-4eo4</link>
      <guid>https://dev.to/objectbox/how-to-get-started-with-objectbox-database-4eo4</guid>
      <description>&lt;p&gt;This tutorial is for anyone new to C++ who wants to get started with ObjectBox on Windows. It will help you install all the development tools needed to get going.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://objectbox.io/"&gt;ObjectBox Database&lt;/a&gt; is a high-performant embedded database with integrated &lt;a href="https://objectbox.io/sync/"&gt;Data Sync&lt;/a&gt; to make it easy for app developers to store and sync data on and across embedded devices / edge devices in Mobile and IoT projects. By storing data systematically, you will always be able to access, manipulate and search for different entries in your app with ease.&lt;/p&gt;

&lt;p&gt;We will start with setting up a Linux subsystem (WSL2) and installing some build tools, as well as CMake and Git. Then, we will compile ObjectBox and run a simple example app in Visual Studio Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Windows Subsystem for Linux (WSL2)
&lt;/h2&gt;

&lt;p&gt;In this section, you will set up a simple Linux subsystem that you can use to build Objectbox in C++.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install"&gt;Install WSL&lt;/a&gt; (Note: this requires a reboot; it also configures a limited HyperV that may cause issues with e.g. VirtualBox).&lt;br&gt;
Warning: to paste e.g. a password to the Ubuntu setup console window, right-click the title bar and select Edit → Paste. CTRL + V may not work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;(optional, but recommended) install &lt;a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab"&gt;Windows Terminal&lt;/a&gt; from Microsoft Store and use Ubuntu from there (does not have the copy/paste issue, also supports terminal apps better).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose Ubuntu from the dropdown menu in the Windows Terminal to open it in another tab.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5TrAKlWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vep133sciom2wty8z24c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5TrAKlWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vep133sciom2wty8z24c.jpg" alt="Screenshot of the dropdown menu in Windows Terminal" width="370" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get the latest packages and upgrade:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install build tools:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install build-essential git cmake ccache gdb
LLVM_VERSION=12
sudo apt install clang-$LLVM_VERSION clang-tools-$LLVM_VERSION clang-format-$LLVM_VERSION lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$LLVM_VERSION 1000
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 1000
sudo update-alternatives --config c++
sudo update-alternatives --config clang++
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 1000
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 1000
sudo update-alternatives --config cc
sudo update-alternatives --config clang
cc --version
c++ --version
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-$LLVM_VERSION 1000
sudo update-alternatives --install /usr/bin/scan-build scan-build /usr/bin/scan-build-$LLVM_VERSION 1000
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-$LLVM_VERSION 50
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.bfd 10
sudo update-alternatives --config ld
ld --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install and compile ObjectBox C++ database using CMake
&lt;/h2&gt;

&lt;p&gt;Now let's complete our setup by installing some useful extensions in Visual Studio Code. After this we can go straight into installing ObjectBox.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Within Ubuntu, make a new directory for our example and open it in Visual Studio Code:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir objectbox-ex
cd objectbox-ex
code .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the following extensions:&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl"&gt;Remote - WSL&lt;/a&gt;&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools"&gt;C/C++&lt;/a&gt;&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools"&gt;CMake Tools&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create CMakeLists.txt – a standard file for installing CMake projects. It is needed to get the ObjectBox source code from its Git repository and link the library to your project.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include(FetchContent) 
FetchContent_Declare( 
objectbox 
GIT_REPOSITORY https://github.com/objectbox/objectbox-c.git 
GIT_TAG v0.14.0 
) 
FetchContent_MakeAvailable(objectbox) 
add_executable(myapp main.cpp) 
target_link_libraries(myapp objectbox)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;main.cpp&lt;/code&gt; file with the following contents to verify the setup:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include "objectbox.hpp"
int main() {
printf("Using ObjectBox version %s\n", obx_version_string());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Follow &lt;a href="https://code.visualstudio.com/docs/cpp/cmake-linux#_select-a-kit"&gt;this guide for VS Code&lt;/a&gt; to select Clang as the compiler, configure and build ObjectBox. As a result, .vscode and build folders will be generated. This is how your directory should look like at this point:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--waMrknvC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avcmqh9ycatvd5qw2jof.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--waMrknvC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avcmqh9ycatvd5qw2jof.JPG" alt="Project directory showing the folders generated on build." width="389" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the tasks-list example
&lt;/h2&gt;

&lt;p&gt;Let's now run a standard ObjectBox example to see the database in action. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click “Select target to launch” on the status bar and select &lt;strong&gt;myapp&lt;/strong&gt; as the target. Then click “launch”: the app will output the correct ObjectBox version as shown in the screenshot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hNAuuQwB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dumae3xd40rvnn9dl8q5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hNAuuQwB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dumae3xd40rvnn9dl8q5.png" alt="select target to launch in VS code" width="744" height="161"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--68d-GhNa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq525poqyswwvd0bq7ly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--68d-GhNa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq525poqyswwvd0bq7ly.png" alt="launch selected target in VS code" width="103" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now you can run &lt;strong&gt;objectbox-c-examples-tasks-cpp-gen&lt;/strong&gt;: a simple To-Do list app. Try exploring its functionality by looking at the source code to get a better idea of how ObjectBox database is used to store, get, and mark tasks as done. Here is what the output of the app looks like:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_e0r8bdK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhju7egy82bv5uguccvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_e0r8bdK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhju7egy82bv5uguccvx.png" alt="ObjectBox task-list example app output" width="574" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done! Now you have everything you need to start working with ObjectBox. Check out the &lt;a href="https://cpp.objectbox.io/"&gt;ObjectBox C/C++ API docs&lt;/a&gt; to find more about what you can do with this library. We'd love to see what you build, so don't be a stranger - share your projects and ideas with us via our &lt;a href="https://twitter.com/ObjectBox_io"&gt;Twitter&lt;/a&gt; and &lt;a href="https://github.com/objectbox/objectbox-c"&gt;GitHub&lt;/a&gt;. You'd also help us a lot by sharing your opinion via this &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSd0rNJOf9Gmkk_Ares42pWM60XrPfJ67fBhhjJ4UFjxtMTkvg/viewform"&gt;Feedback Form&lt;/a&gt;. Thanks!&lt;/p&gt;

</description>
      <category>database</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>cpp</category>
    </item>
    <item>
      <title>Firebase / Firestore alternatives – solutions for data sync</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Thu, 11 Nov 2021 12:15:38 +0000</pubDate>
      <link>https://dev.to/objectbox/firebase-firestore-alternatives-solutions-for-data-sync-20ln</link>
      <guid>https://dev.to/objectbox/firebase-firestore-alternatives-solutions-for-data-sync-20ln</guid>
      <description>&lt;p&gt;Syncing Data is hard. Every developer who has tried building their own solution knows this. Because of today’s growing data volumes, &lt;a href="https://objectbox.io/what-is-data-synchronization-how-to-keep-data-in-sync/"&gt;data sync is all the more relevant&lt;/a&gt;. Even with JSON / REST still being a good way to transfer data, the need for out-of-the-box solutions cannot be ignored. That's why this article will present you with the Data Sync solutions that might serve as good Firebase / Firestore alternatives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Introduction

&lt;ul&gt;
&lt;li&gt;What is Firebase?&lt;/li&gt;
&lt;li&gt;What is the difference between Firebase and Firestore?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
A bit more about Firebase

&lt;ul&gt;
&lt;li&gt;Firebase advantages&lt;/li&gt;
&lt;li&gt;Firebase disadvantages&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
Firebase alternatives

&lt;ul&gt;
&lt;li&gt;List of alternatives&lt;/li&gt;
&lt;li&gt;Comparison matrix&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;ObjectBox Data Sync&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction to Firebase and Data Sync &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;While being one of the most popular solutions for data sync, Firebase has its own drawbacks. The biggest one is a lack of local data storage and offline access to it. This is where Edge Computing comes in, driving the &lt;a href="https://objectbox.io/what-drives-edge-computing/"&gt;shift from the cloud to the edge&lt;/a&gt;. We have already discussed the &lt;a href="https://objectbox.io/sqlite-alternatives/"&gt;available edge database solutions&lt;/a&gt; that benefit from an offline-first approach. But what about syncing data on the edge? Right now, only a handful of Edge Data Sync solutions exist for Mobile and IoT developers. In this review of Firebase alternatives, we limit ourselves to a selection of the most well-known cloud-based Data Sync solutions. In addition, we include all the edge / offline Data Sync options that we know of.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Firebase? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Firebase is a development platform from Google that allows building mobile or web applications without needing to take care of the backend. Its backend cloud service, &lt;a href="https://en.wikipedia.org/wiki/Mobile_backend_as_a_service"&gt;(M)BaaS&lt;/a&gt;, handles aspects like data synchronization, scalability, network, infrastructure challenges etc. The services offered on the platform go well beyond Data Sync (e.g. analytics, crashlytics), but we will look at Firebase from the Data Sync perspective only. Together with Parse and Couchbase, Firebase was one of the first three Data Sync solutions available on the market. All of them started in 2011. Three years later, in 2014, Firebase was acquired by Google and Parse was acquired by Facebook. Later, the Parse platform was open sourced and the server was shut down.  All three are still in use today.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between Firebase and Firestore? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Firebase is a development platform, and Cloud Firestore is one of the two cloud-based databases offered as a part of the platform, alongside their Realtime Database. So while Firebase stands for a wide collection of services, Firestore is a particular part of the offering.&lt;/p&gt;

&lt;h2&gt;
  
  
  A bit more about Firebase &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let us first have a look at the benefits and drawbacks of using Firebase. Then, we will compare Firebase with available alternatives, like Couchbase, Parse and ObjectBox, in a comprehensive matrix.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the Firebase advantages? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Google:

&lt;ul&gt;
&lt;li&gt;large team that supports and maintains the product&lt;/li&gt;
&lt;li&gt;very low risk of the company failing; however, Google has a reputation of discontinuing products / services, so there is no guarantee.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Backend as a service (ease of use)&lt;/li&gt;
&lt;li&gt;The Firebase Realtime Database has its own advantages:

&lt;ul&gt;
&lt;li&gt;for pure online use cases rather fast&lt;/li&gt;
&lt;li&gt;great if you do not have a strong DB background&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Pay as you go, price scales with usage&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are the Firebase disadvantages? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Purely cloud based&lt;/li&gt;
&lt;li&gt;Google:

&lt;ul&gt;
&lt;li&gt;vendor lock-in - no migration tools, prevents you from making your app portable&lt;/li&gt;
&lt;li&gt;you cannot access your data as it is hosted on the Firebase server&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Less flexibility: You cannot optimize the backend to match your app’s needs&lt;/li&gt;
&lt;li&gt;The Firebase Realtime Database has its own drawbacks:

&lt;ul&gt;
&lt;li&gt;the whole DB is a huge JSON file&lt;/li&gt;
&lt;li&gt;limited querying capabilities&lt;/li&gt;
&lt;li&gt;no way to efficiently filter data&lt;/li&gt;
&lt;li&gt;easily disorganized, hard to navigate and search&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Cost insecurities, hard to impossible to predict&lt;/li&gt;
&lt;li&gt;Less iOS support (stronger focus on Android)&lt;/li&gt;
&lt;li&gt;Doesn’t work in countries that don’t allow Google&lt;/li&gt;
&lt;li&gt;User privacy concerns&lt;sup id="fnref1"&gt;1&lt;/sup&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Firebase alternatives: A look at out-of-the-box data sync solutions &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Most of the options for handling &lt;a href="https://objectbox.io/what-is-data-synchronization-how-to-keep-data-in-sync/"&gt;data synchronization as described here&lt;/a&gt;, are cloud-based backend services ((M)BaaS), platform services (PaaS) or database services (DBaaS). This usually means that Data Sync is not the primary product, but only one forms one part of a whole offering. However, we solely focus on that here.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the Firebase alternatives for data sync? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Cloudant"&gt;Cloudant Sync&lt;/a&gt; - a Cloud database based on CouchDB&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Couchbase_Server"&gt;Couchbase server &amp;amp; Sync Gateway&lt;/a&gt; - a NoSQL, document database&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Realm_(database)"&gt;Mongo Realm Sync&lt;/a&gt; - Cloud DB and Cloud Sync&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://objectbox.io/sync/"&gt;ObjectBox Sync&lt;/a&gt; - an object-oriented embedded NoSQL DB, offering offline and cloud sync&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Parse_(platform)"&gt;Parse&lt;/a&gt; - a cloud sync solution that works with a self-hosted server&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.dbsyncstudio.com/buy/"&gt;Syncstudio&lt;/a&gt; - a relational database with a cloud-based sync&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://zumero.com/"&gt;Zumero&lt;/a&gt; - a cloud-based replication of SQL data for Mobile&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Sync solutions comparison matrix – Firebase and its alternatives &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Solution name&lt;/th&gt;
&lt;th&gt;Data Sync&lt;/th&gt;
&lt;th&gt;Database&lt;/th&gt;
&lt;th&gt;Cloud&lt;/th&gt;
&lt;th&gt;License&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cloudant Sync&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Two-way cloud data replication&lt;/td&gt;
&lt;td&gt;Couch DB: NoSQL, distributed JSON document database&lt;/td&gt;
&lt;td&gt;CouchDB &amp;lt;&amp;gt; cloud service&lt;/td&gt;
&lt;td&gt;Proprietary (CouchDB is Apache 2.0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Couchbase server &amp;amp; Sync Gateway&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sync needs a Couchbase Server&lt;/td&gt;
&lt;td&gt;Edge: Couchbase Lite; Server: Couchbase. NoSQL, document database&lt;/td&gt;
&lt;td&gt;Always needs Couchbase Server (originally Membase)&lt;/td&gt;
&lt;td&gt;Apache 2.0, delayed open source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Firebase&lt;sup id="fnref2"&gt;2&lt;/sup&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud Sync via Google servers&lt;/td&gt;
&lt;td&gt;Cloud: Firebase Realtime DB (document store); Edge: Caching only (Firestore)&lt;/td&gt;
&lt;td&gt;hosted only&lt;/td&gt;
&lt;td&gt;proprietary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mongo Realm Sync&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sync (in Alpha); only via Mongo Cloud&lt;/td&gt;
&lt;td&gt;Cloud: MongoDB (NoSQL document store), Edge: Mongo Realm (Embedded NoSQL)&lt;/td&gt;
&lt;td&gt;hosted service&lt;/td&gt;
&lt;td&gt;Server Side Public License (SSPL)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ObjectBox Sync&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Offline Sync, on-premise Sync, Cloud Sync, p2p Sync is planned&lt;/td&gt;
&lt;td&gt;Object-oriented embedded NoSQL DB&lt;/td&gt;
&lt;td&gt;Self-hosted / on-premise; hosted service upon request only&lt;/td&gt;
&lt;td&gt;Bindings - Apache 2.0, proprietary core&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Parse&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud Sync, self-hosted or via a provider that offers Parse hosting&lt;/td&gt;
&lt;td&gt;Can use MongoDB (NoSQL document store), or PostgreSQL&lt;sup id="fnref3"&gt;3&lt;/sup&gt;
&lt;/td&gt;
&lt;td&gt;Only Cloud, only self-hosted or via a provider that offers Parse hosting&lt;/td&gt;
&lt;td&gt;open source, BSD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Syncstudio&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sync&lt;sup id="fnref4"&gt;4&lt;/sup&gt;
&lt;/td&gt;
&lt;td&gt;Edge: SQLite or MSSQL (including LocalDB or Express); Server: Microsoft SQL&lt;/td&gt;
&lt;td&gt;SQL Server; Sync / replication works via cloud only&lt;/td&gt;
&lt;td&gt;proprietary, 4 licenses available: Community/Free, Subscription, Perpetual and Royalty Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Zumero&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sync&lt;/td&gt;
&lt;td&gt;Edge: SQLite; Server: Microsoft SQL&lt;/td&gt;
&lt;td&gt;SQL Server; Sync / replication works via cloud only&lt;/td&gt;
&lt;td&gt;proprietary, annual license scaling with the number of devices&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Check out a more &lt;a href="https://objectbox.io/firebase-and-firebase-alternatives-a-look-at-data-sync-solutions/"&gt;detailed Firebase alternatives matrix&lt;/a&gt;, which also includes information about the supported platforms and programming languages of each solution.&lt;/p&gt;

&lt;p&gt;Note: the term “Data Sync” is not standardized. Even though most developers know what it is and the term is used by a number of big companies, the reality is not that straightforward. If we have missed any other important solutions, let us know about them. Apart from that, if there are inaccuracies in our reasoning, please feel free to point them out. We appreciate your feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you should choose ObjectBox as your Data Sync solution &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;ObjectBox is a high-performance NoSQL edge database that is fully ACID-compliant. It is built for efficient data on and across restricted and occasionally connected devices, taking care of keeping data in sync reliably. ObjectBox is optimized for economic resource use on edge devices running mobile, desktop, server, and IoT applications. Its developer tools are easy to use and quick to implement, because they were built with the developer experience in mind. You don’t need to take care of the boilerplate code for resilient connectivity, synchronizing data, and tedious DB optimizations. We strive to make the whole experience with us as seamless as possible: from implementation to maintenance, avoiding undesired problems, and data loss. This doesn’t only reduce stress, but also costs and time to market. We are dedicated to bringing joy and delight to Mobile and IoT application developers.&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;“Firebase has been claimed to be used by Google to track users without their knowledge. On July 14, 2020, a lawsuit was filed accusing Google of (…) logging what the users are looking at in many types of apps, despite the user following Google’s own instructions to turn off the web and app activity collected by the company.” (&lt;a href="https://en.wikipedia.org/wiki/Firebase)anced"&gt;https://en.wikipedia.org/wiki/Firebase)anced&lt;/a&gt; settings. ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;There are many Cloud Sync alternatives to Firebase, we added the more prominent options and any service that also serves Edge Computing ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;&lt;a href="https://www.enterprisedb.com/blog/postgres-vs-postgresql"&gt;PostgreSQL vs Postgres&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Microsoft_Sync_Framework"&gt;Microsoft Sync Framework&lt;/a&gt; (renamed Sync Framework Toolkit at some point) is a legacy open source product which MS no longer supports ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>database</category>
      <category>sync</category>
      <category>firebase</category>
      <category>edgecomputing</category>
    </item>
    <item>
      <title>Which Flutter database should you use?</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Fri, 05 Nov 2021 13:10:11 +0000</pubDate>
      <link>https://dev.to/objectbox/flutter-databases-sqlite-sqflite-moor-hive-objectbox-4m5m</link>
      <guid>https://dev.to/objectbox/flutter-databases-sqlite-sqflite-moor-hive-objectbox-4m5m</guid>
      <description>&lt;p&gt;As &lt;a href="https://flutter.dev/" rel="noopener noreferrer"&gt;Flutter&lt;/a&gt; continues to gain prominence, so does the need for efficient and reliable data management within Flutter applications. In May 2023, there are already over &lt;a href="https://techcrunch.com/2023/05/10/with-over-1m-published-apps-googles-flutter-expands-its-support-for-web-apps-and-webassembly/" rel="noopener noreferrer"&gt;1M Flutter apps&lt;/a&gt; published. This demand has given rise to a diverse range of Flutter database options, each offering unique features and capabilities. In this article, we delve into the landscape of Flutter databases, comparing the various options available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Briefly about data persistence
&lt;/h2&gt;

&lt;p&gt;When it comes to databases, the ones available for Flutter/Dart are just a small part of the overall database market. Before we jump into exploring the various Flutter database options, let's quickly refresh our understanding of databases to ensure we're all on the same page.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a database?
&lt;/h3&gt;

&lt;p&gt;A database is a software for storing data long-term (&lt;strong&gt;data persistence&lt;/strong&gt;) as opposed to short-term caching. This enables the systematic use of digital information. Data is stored continually unless deliberately deleted, in contrast to simple &lt;a href="https://en.wikipedia.org/wiki/Cache_(computing)" rel="noopener noreferrer"&gt;caching&lt;/a&gt;, where data is discarded regularly. Developers can manipulate the data stored in a database in different ways via an API: store, access, search, update, query, etc. Since these operations are done in the background, end users usually don’t see them. A large number of applications need to have a database in their technology stack. The most vital database operations are abbreviated as &lt;strong&gt;CRUD&lt;/strong&gt;, which stands for &lt;strong&gt;C&lt;/strong&gt;reate, &lt;strong&gt;R&lt;/strong&gt;ead, &lt;strong&gt;U&lt;/strong&gt;pdate, &lt;strong&gt;D&lt;/strong&gt;elete.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is an ORM?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://greenrobot.org/android/sqlite-access-with-an-orm-faq/" rel="noopener noreferrer"&gt;Object relational Mapper&lt;/a&gt; (ORM) is a term that is often misused. It is not a database, but a layer that sits on top of it and makes the database easier to use. Typically, this is especially relevant for relational databases (SQL) when used with an object-oriented programming language like Dart. &lt;/p&gt;

&lt;h3&gt;
  
  
  What kind of databases are there?
&lt;/h3&gt;

&lt;p&gt;Databases can be categorized in a number of different ways. For the purposes of this review, the most important distinctions are between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cloud databases versus &lt;a href="https://objectbox.io/what-is-an-edge-database-and-why-do-you-need-one/" rel="noopener noreferrer"&gt;edge databases&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;non-relational (NoSQL) versus relational databases (SQL);&lt;/li&gt;
&lt;li&gt;embedded versus in-memory databases.
Other criteria that databases can be distinguished by include supported data types and scalability – definitions can vary.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Flutter database options: SQLite, hive, ObjectBox, and Moor
&lt;/h2&gt;

&lt;p&gt;The amount of databases available in the Flutter Dart data persistence landscape is still very limited. These are: Firebase Realtime DB, Hive, ObjectBox, sqflite, Moor. Please note that even though Moor is not a database, we included this ORM in our overview because the number of players on the market is so small that it is worth considering Moor as a separate player.&lt;/p&gt;

&lt;p&gt;Shortly about the current Flutter database options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/hivedb/hive" rel="noopener noreferrer"&gt;&lt;strong&gt;Hive&lt;/strong&gt;&lt;/a&gt; is a lightweight key-value database written in Dart for Flutter applications, inspired by Bitcask.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pinchbv.github.io/floor/" rel="noopener noreferrer"&gt;&lt;strong&gt;Floor&lt;/strong&gt;&lt;/a&gt; is an object-oriented SQLite database wrapper for Flutter, inspired by Room, a similar library for Android.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://drift.simonbinder.eu/" rel="noopener noreferrer"&gt;&lt;strong&gt;Drift&lt;/strong&gt;&lt;/a&gt; is a reactive persistence library for Flutter and Dart, built on top of sqlite. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/objectbox" rel="noopener noreferrer"&gt;&lt;strong&gt;ObjectBox Flutter DB&lt;/strong&gt;&lt;/a&gt; is a high-performance lightweight NoSQL database that stores objects.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/SQLite" rel="noopener noreferrer"&gt;&lt;strong&gt;sqflite&lt;/strong&gt;&lt;/a&gt; is an SQLite plugin for Flutter, which is a relational database without direct support for Dart objects. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is the best Flutter database?
&lt;/h2&gt;

&lt;p&gt;Determining the best Flutter database is subjective and varies for each individual. To assist you in making an informed decision, consider referring to the following comparison matrix as a starting point. However, it's important to note that due to the limited number of options available, comparing them can be akin to comparing different flavours of ice cream 🍦. Ultimately, the choice depends on your specific needs and preferences.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;ORM/Database&lt;/th&gt;
&lt;th&gt;Storage Type&lt;/th&gt;
&lt;th&gt;Data Model&lt;/th&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;sqflite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SQLite plugin&lt;/td&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;relational&lt;/td&gt;
&lt;td&gt;SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Floor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ORM&lt;/td&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;used on top of a relational DB&lt;/td&gt;
&lt;td&gt;local&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Drift&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ORM&lt;/td&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;used on top of a relational DB&lt;/td&gt;
&lt;td&gt;Dart or SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ObjectBox&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;File-Based&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hive&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;File-based&lt;/td&gt;
&lt;td&gt;NoSQL&lt;/td&gt;
&lt;td&gt;Dart&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Flutter Database performance benchmarks
&lt;/h2&gt;

&lt;p&gt;As with any performance test, it is best to &lt;a href="https://github.com/objectbox/objectbox-dart-performance" rel="noopener noreferrer"&gt;run Flutter Databases benchmarks yourself&lt;/a&gt;. Accurate results are very important for us and we take benchmarking very seriously. Please let us know if you note anything that does not even out in your opinion. We have been updating and improving our benchmarks for a long time and are happy to take any recommendations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance Benchmark Test Setup
&lt;/h3&gt;

&lt;p&gt;We used an Android 10 device with a Kirin 980 CPU to run the benchmarks as a Flutter app. The app executed all operations (ops) in batches of 10.000 objects. Each batch formed a single transaction. We ran each test 50 times. The results you see in the diagram are averages across all runs. We set it up that way to ensure that neither the Virtual Machine warmup during the first run nor the garbage collections affect the overall result significantly. &lt;/p&gt;

&lt;h3&gt;
  
  
  CRUD Performance Results
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqhiakpzp1tbp6u6tlhm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqhiakpzp1tbp6u6tlhm.png" alt="Flutter benchmarks: sqflite vs ObjectBox vs hive"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flutter Dart Database Benchmarks
&lt;/h3&gt;

&lt;p&gt;Hive and ObjectBox clearly outperform sqflite across all CRUD operations. For create and update operations, the results show ObjectBox performing up to 70 times faster. When comparing Hive and ObjectBox, we can see the results varying more. Hive can be faster at reading objects than ObjectBox. However, strictly speaking it’s not a fair comparison, because in Hive, the high read numbers result from Dart objects already cached in memory. If the objects are fetched using the async API from disk, the numbers drop by factor 1000.&lt;/p&gt;

&lt;p&gt;Moor was not part of the benchmarking as it is an ORM. However, it is very likely it will perform similarly to sqflite, reflecting primarily the performance of SQLite.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Flutter database landscape - Conclusion
&lt;/h2&gt;

&lt;p&gt;Data persistence solutions for Flutter are becoming more important since Flutter grows so quickly as a developer platform. Only a few databases are now offered to the Flutter community on the market, so it will be interesting to see how this grows in the future. Through our comprehensive comparison, we have explored key criteria such as ORM support, storage type, data model, and the programming language used. By evaluating these factors and considering individual preferences, developers can make informed decisions to optimize data management and enhance the performance of their Flutter applications. Regularly staying updated with emerging options and community feedback will help you choose the most suitable Flutter database for future projects.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>database</category>
      <category>performance</category>
    </item>
    <item>
      <title>Flutter databases –  sqflite, hive, ObjectBox, and Moor</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Wed, 03 Feb 2021 21:08:14 +0000</pubDate>
      <link>https://dev.to/objectbox_io/flutter-databases-sqflite-hive-objectbox-and-moor-4aga</link>
      <guid>https://dev.to/objectbox_io/flutter-databases-sqflite-hive-objectbox-and-moor-4aga</guid>
      <description>&lt;p&gt;The post &lt;a href="https://objectbox.io/flutter-databases-sqflite-hive-objectbox-and-moor/"&gt;Flutter databases – sqflite, hive, ObjectBox, and Moor&lt;/a&gt; appeared first on &lt;a href="https://objectbox.io"&gt;ObjectBox&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>ObjectBox Swift 1.0 Released</title>
      <dc:creator>ObjectBox.io</dc:creator>
      <pubDate>Tue, 24 Sep 2019 12:53:04 +0000</pubDate>
      <link>https://dev.to/objectbox/objectbox-swift-1-0-released-507g</link>
      <guid>https://dev.to/objectbox/objectbox-swift-1-0-released-507g</guid>
      <description>&lt;p&gt;ObjectBox Swift 1.0 is here! Since the first public alpha released 10 months ago, we’ve worked hard and made major changes to &lt;a href="https://objectbox.io/objectbox-swift-binding-open-sourced/"&gt;put Swift first&lt;/a&gt;, &lt;a href="https://objectbox.io/speed-increase-with-swift/"&gt;tune the performance&lt;/a&gt;, and iterate on the API. We hope you will love the result. &lt;/p&gt;

&lt;p&gt;All of this, to bring you the features you expect from a database, but more importantly – the features that we think delight developers and sets ObjectBox apart from other databases out there. Let’s swiftly (cheap pun intended) dive into ObjectBox Swift 1.0:&lt;/p&gt;

&lt;h2&gt;
  
  
  Built with Swift in Mind
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// objectbox: entity&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;Olympian&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;store&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="kt"&gt;Store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;directoryPath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;dbURL&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;box&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;for&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Olympian&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;olympians&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;Olympian&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;goldMedalist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Olympian&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sarahHoefflinId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ObjectBox isn’t just a database bolted onto Swift. Your database entities are &lt;strong&gt;regular Swift classes or structs&lt;/strong&gt; that you devise. No need to subclass a particular class (as with CoreData’s NSManagedObject), nor to write tedious serialization code. 😊&lt;/p&gt;

&lt;p&gt;All you need to do is add one property for the unique ID, build your project, and ObjectBox’s code generator will write a little bit of code for you, just like the Swift compiler does for Codable objects. All that’s left then, is to call a simple method like put() on the object to write it out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ruthJebet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ve tried to keep this simplicity throughout the Swift binding, e.g. making it very easy to &lt;a href="https://swift.objectbox.io/advanced/custom-types"&gt;use any RawRepresentable enum&lt;/a&gt; without writing any conversion code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automatic Schema Migrations
&lt;/h2&gt;

&lt;p&gt;A common chore with databases is schema migration. ObjectBox takes care of that. If you add a new property or class there are no additional migration steps required. Old objects will keep working, and new objects will be saved with the additional fields. Similarly, adding new classes will add them to the database without any error-prone migration steps.&lt;/p&gt;

&lt;p&gt;Moreover, you do not need to maintain a dedicated schema, because &lt;strong&gt;your classes and structs are the schema&lt;/strong&gt; in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;Author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Entity&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;books&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;ToMany&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;Book&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;

    &lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;amandaPalmer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;books&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;theArtOfAsking&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;amandaPalmer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;books&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;applyToDb&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To ensure ObjectBox knows how to save object references, you use a wrapper class. Either ToOne or ToMany, instead of a straight reference or an array. This lets ObjectBox &lt;strong&gt;lazily load the related objects&lt;/strong&gt; from the database, only when you’re actually accessing a related object.&lt;/p&gt;

&lt;p&gt;The Swift 1.0 release brings you our complete set of relations: One-to-many, many-to-many, and their corresponding back-links. ToMany behaves just like any other Swift collection, you can add or remove objects as you please with your familiar methods like append().&lt;/p&gt;

&lt;h2&gt;
  
  
  Queries
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kt"&gt;Author&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fname&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"Jeaniene"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// All Authors matching query.&lt;/span&gt;
&lt;span class="c1"&gt;// All last names of the matching authors:&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;property&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Author&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                     &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;distinct&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findStrings&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course ObjectBox lets you perform queries to collect data; either complete objects or individual properties (basic Swift data types).&lt;/p&gt;

&lt;p&gt;But with ObjectBox you don’t mess around with query strings or unpack data from cursors. You simply write &lt;strong&gt;Swift expressions&lt;/strong&gt; with function calls and operators you’re already used to.&lt;/p&gt;

&lt;p&gt;Also, you get to keep the type-safety guarantees and compile-time checking. So you don’t have to spend hours figuring out why your query doesn’t return the proper results, just to discover you made a typo in a field name in a query string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;subscription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;authors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reportError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;authors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;authors&lt;/span&gt;
    &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tableView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reloadData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ObjectBox lets you then operate on these objects, watch a query for changes, retrieve the results, delete the objects matching a query etc. The source code even contains a file that adds &lt;a href="https://developer.apple.com/documentation/combine"&gt;Combine support&lt;/a&gt; so you can integrate with its pipelines to take advantage of Apple’s newest technology.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source Swift Binding
&lt;/h2&gt;

&lt;p&gt;If you’re curious how things work behind the scenes, feel free to check out the Swift source code. The &lt;a href="https://github.com/objectbox/objectbox-swift"&gt;source code for the Swift binding&lt;/a&gt;, as well as our code generator based on Sourcery, are available among other projects through &lt;a href="https://github.com/objectbox"&gt;our Github account&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How-to Get Started
&lt;/h2&gt;

&lt;p&gt;It’s a matter of minutes to get started with ObjectBox. Check our &lt;a href="https://swift.objectbox.io/install"&gt;setup instructions&lt;/a&gt; (based on CocoaPods) and jump right into code with the &lt;a href="https://swift.objectbox.io/getting-started"&gt;getting started guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Feedback. And what’s Next?
&lt;/h2&gt;

&lt;p&gt;As always, &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSd0neiviD0Yal0Tn7921w-XWI2d0ONpLm7TfVKp7OvwW2Tu2A/viewform?usp=sf_link"&gt;we would love to hear your feedback&lt;/a&gt;! Do you like ObjectBox as much as we do? We put our hearts in this product and are excited to learn your thoughts: What features are you most excited about, what are we missing?&lt;/p&gt;

&lt;p&gt;We haven’t written much about a topic very dear to us: performance. We will cover this in a follow up post. Also, look forward to our ObjectBox Swift 1.0 benchmarks, which we will release soon including the sources.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
      <category>database</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
