Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 15, 2022 12:03 pm GMT

Is FaunaDB The Next Big Database Technology?

If you call yourself a builder, whether that means working on a startup, open source, or personal projects, you need to keep up to date with the latest tech. Innovation in software development is only accelerating, with paradigm shifts happening more and more often.

In the world of Databases, FaundaDB has generated a lot of buzz by creating one of the most versatile, scalable, and intuitive database technologies out there.

Today, well explore how FaunaDB works and create and use our first Fauna database.

What is FaunaDB?

Fauna is a serverless, multi-region database that is accessible through a cloud API. That means that Creating, Reading, Updating and Deleting data can all be done within a standard api call.

For the more technically minded, Fauna is whats called a transactional database. In laymans terms, this means that you can get the flexibility of a noSQL database like Mongo, without sacrificing the speed and accuracy you get from a SQL Database.

This makes Fauna an amazing option for startups and personal projects that want to build quickly without incurring a ton of technical debt.

Creating a FaunaDB Account

To get started, first visit the signup page and create a free fauna account. This will direct the user to the fauna dashboard.

Image description

Click on CREATE DATABASE to create a database. Next, provide the database name and the region where the database will be created.

Image description

We will need the access key to interact with the database. Navigate to the security section from the database view. Here, you can create the access key that will be used to communicate with the Fauna API.

Image description

Integrating FaunaDB with an Application

Now that we have created a Fauna database and obtained the access key, we can utilize FaunaDB in an application. In this section, we will look at how we can communicate with FaunaDB using Python. Of course, since this is all API based, implementations will be nearly identical in every language.

Lets first setup a python environment with:

pipenv shell

Image description

Now lets install the dependencies. This is the Python driver for FaunaDB.

Pipenv install faunadb

Image description

Create the Application

In the following code, we connect to our database and perform all four CRUD operations that we expect from a database:

  • Create
  • Read
  • Update
  • Delete

If the program is successfully executed, you should see the following output for each respective function:

Image description

Image description

Image description

Image description

Image description

There you have it! Weve setup our own FaunaDB project and performed all the standard database technologies in less than 100 lines of code. The simplicity of this implementation isnt a result of us cutting corners its actually that easy!

So what do you think? Are you going to be using FaunaDB for your next project? Let us know down below!

Happy coding from your good friends at Codesphere, the Swiss army knife every software developer needs.


Original Link: https://dev.to/codesphere/is-faunadb-the-next-big-database-technology-ad6

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To