Announcing the Simple Database Archival Solution

Today, we are excited to announce the release of the Simple Database Archival Solution (SDAS). SDAS is an open source solution available under Apache License 2.0, which you can deploy in your AWS account to archive data to AWS. SDAS provides organizations with an efficient, easy and cost-effective solution for archiving Oracle, Microsoft SQL, and MySQL databases.

SDAS addresses a common problem faced by many AWS customers, which is the need to efficiently and securely archive data from their databases. Many organizations are required to retain data for long periods, and storing this data on-premises can be costly and complex. Additionally, cloud adoption is becoming more prevalent, and customers often need a solution to easily transfer data from their cloud-hosted databases to the cloud for long-term storage.

SDAS offers a differentiated solution by providing an easy-to-use, open source tool that can be deployed directly into customers’ AWS accounts. With SDAS, customers can quickly and easily map the schema of their database, perform validation, and transfer data to Amazon Simple Storage Service (Amazon S3) for storage. This is accomplished using AWS Step Functions, AWS Glue, Amazon S3, and Amazon Athena which provide a highly scalable and reliable solution for transferring data.

With its open source approach, SDAS offers customers a high degree of flexibility to customize and extend the solution to meet their unique requirements. This level of flexibility ensures that the solution can be adapted to the specific needs of any organization, regardless of their size or industry.

What is Simple Database Archival Solution (SDAS)?

As businesses accumulate more and more data over time, the need for effective database archiving solutions has become increasingly important, for example moving older, rarely used data to an archive. Businesses can reduce the size of their active databases, which can improve performance and reduce storage costs. Archiving can also help organizations meet legal and regulatory requirements for data retention, as well as ensure that important data is available for future use and discovery, if necessary. Out of the box, SDAS provides the following key features:

Support Oracle, MySQL or Microsoft SQL Server
Identify the data type and table schema
Validate the data on the target after the archiving process has completed
Configure WORM (“Write Once Read Many”)
Define a data retention period for the data
Provide detailed information about the status of the data
Perform various data validation and integrity checks
Make it simple for operations to ingest and archive a database
Preview data archived in Amazon S3

SDAS Architecture

SDAS is a solution that provides customers with a robust and scalable mechanism for archiving databases to AWS. SDAS has an intuitive front-end interface as its core, enabling users to easily manage and configure their archives. The front-end is built using the CloudScape Design Framework, a powerful and flexible framework for developing web applications. This front-end is supported by several key AWS services, including Amazon Cognito for authentication and authorization, API Gateway with Amazon Lambda functions for user operations, and Amazon S3 for storing the front-end build files.

Amazon Cognito is a fully managed service that provides user authentication and authorization, making it easy to secure user access to web and mobile applications. It supports several authentication methods, including social identity providers such as Facebook, Google, and Amazon, as well as enterprise identity providers via SAML 2.0. With Cognito, users can easily sign up, sign in, and manage their own profiles and settings, without the need for complex user management infrastructure.

API Gateway is a fully managed service that provides a secure, scalable, and reliable API for interacting with SDAS’s front-end interface. It enables users to easily integrate SDAS with other AWS services or third-party applications, while also providing features such as authentication, and authorization. Supporting Lambda functions are used to provide serverless compute resources for user operations, enabling SDAS to easily handle varying levels of traffic and user load. Finally, Amazon S3 is used to store the front-end build files, providing a highly durable and scalable object storage service that is optimized for use with AWS applications.

The SDAS platform also includes Amazon DynamoDB, which serves as the primary storage mechanism for archive metadata. DynamoDB provides a highly scalable and durable NoSQL database that is optimized for high-volume workloads. Additionally, the solution leverages AWS Secrets Manager to securely store passwords and other sensitive information.

Archiving of data is performed using AWS Glue, a fully managed ETL service that enables customers to extract, transform, and load data from a variety of sources. SDAS includes pre-built Spark Python scripts that are used to transform the data before archiving it to Amazon S3. The archived data is stored in Parquet file format, which is optimized for query performance and storage efficiency.

Finally, to provide users with an easy-to-use interface for querying archived data, SDAS leverages Amazon Athena. Athena is a serverless query service that allows users to query data stored in S3 using SQL. By using Athena, users can quickly and easily perform ad-hoc analysis on their archived data without the need for complex setup or maintenance.

In summary, SDAS provides a comprehensive solution for archiving databases to AWS that leverages several key AWS services to enable reliability, scalability, and security. The solution is highly customizable and can be tailored to meet the specific needs of individual customers. With its intuitive front-end and powerful back-end architecture, SDAS is an ideal solution for organizations looking to simplify the process of archiving their data to the cloud.

Sample Use Case

A health care and life sciences company needs to decommission a Microsoft SQL database as it is associated with a legacy application that is no longer in use. The database contains important historical data that the company needs to retain. Maintaining the database up and running incurs significant costs, including licensing, maintenance, and hardware expenses and it is no longer being required by day-to-day business operations. To address this challenge, the company decides to decommission the Microsoft SQL database and archive its data to AWS using SDAS.

By archiving the data with SDAS, the company can take advantage of lower storage costs, better data durability, and easy accessibility for analysis and reporting. The business impact of this decision includes:

Cost Savings: Decommissioning the Microsoft SQL database reduces expenses related to licensing, maintenance, and hardware. This frees up resources that can be allocated to more critical business initiatives.

Simplified Data Management: By consolidating the historical data in Amazon S3, the company streamlines its data management processes. This makes it easier to perform data analysis and generate reports when needed, without the complexity of managing a legacy database.

Security: AWS offers advanced security features, such as encryption and access controls, helping the company protect its sensitive historical data.

Scalability: As the company continues to grow, Amazon S3’s scalable storage solution enables them to store and manage increasing amounts of data without worrying about capacity constraints.

By archiving the Microsoft SQL database to Amazon S3 using SDAS, the health care and life sciences company can effectively balance the need to preserve important historical data with the desire to optimize operational costs and improve overall data management.

Steps to Archive a Database with SDAS: A Comprehensive Solution for AWS Customers

Start and Discover

To start the archiving process, gather essential connection information, including the database name, database URI, and credentials. With this information, SDAS attempts to connect to the database, and if successful, proceeds to the next step. In the next step, SDAS collects the tables and associated schema from the target database to be archived.

Figure 1: Screenshot view of SDAS connecting to the Source Database.

To identify the data that needs to be archived, SDAS uses a technique to scan the metadata associated with the table. This process is designed to accurately identify the data type and schema of the table and ensure that the data is properly formatted and validated before being transferred to AWS. The process involves running multiple SQL queries to extract the database schema definition to allow AWS Glue to read and finally write the data to Amazon S3.

Once the data type and schema of the table have been identified, SDAS can begin the process of transferring the data to AWS.

Figure 2: Screenshot view of SDAS performing a scan as well as gathering the database schema definition.

Archive

The archive phase of SDAS is a critical step in the process of archiving data to Amazon S3. SDAS is designed to automatically archive data from Oracle, Microsoft SQL, and MySQL databases, providing flexibility and versatility for customers. The archiving process can be triggered either manually or automatically based on a defined schedule, enabling customers to customize the solution to their specific needs.

Figure 3: Screenshot view of SDAS starting an archive process.

At the core of the archive phase is AWS Glue, a fully managed Extract, Transform, and Load (ETL) service that provides a flexible and scalable solution for copying the database from the source to the target. SDAS leverages the power of AWS Glue to perform necessary transformations on the data, including data cleaning and schema transformations, ensuring that the data is properly formatted and validated before being transferred to Amazon S3.

Once the data is transferred to Amazon S3, it is stored as Parquet files, a columnar storage format that is optimized for query performance and storage efficiency. This makes the archived data easy to query, for instance using Amazon Athena, a serverless query service that allows customers to query data stored in S3 using SQL. By leveraging the power of Amazon Athena, customers can easily perform ad-hoc analysis on their archived data without the need for complex setup or maintenance.

Figure 4: Screenshot view of the AWS Glue jobs running which copies the data from the source to Amazon S3.

Data Validation

The data validation phase of SDAS is a critical step that ensures the accuracy and completeness of the archived data. After the archival process is complete, SDAS automatically triggers a validation process to ensure that the data has been properly transferred and stored in Amazon S3.

The validation process begins by comparing the source data to the archived data stored in Amazon S3, using a variety of techniques such as checksums, and data sampling. This process ensures that the data has been accurately transferred and stored, with no data loss or corruption. SDAS does not perform validation on the source data, only on the data stored in Amazon S3.

If any discrepancies are detected, SDAS provides you with the ability to identify the affected table. In addition to ensuring the accuracy of the archived data, SDAS also provides security features to protect against unauthorized access or modification of the data. Passwords are stored in AWS Secrets Manager, which provides a highly secure mechanism for storing and managing secrets, such as database passwords.

Figure 5: Screenshot of the validation processes performed on the target data.

Access to Archived Databases

Access to the archived databases in SDAS is limited to authorized users who can access them through the Amazon Athena Console. To explore and visualize the data using Business Intelligence tools, users can download, install, and configure either an ODBC (Open Database Connectivity) or JDBC (Java Database Connectivity) driver to connect to Amazon Athena.

SDAS also includes a preview mode through the console, which allows users to quickly view the database that has been archived without the need for additional drivers or tools. This preview mode provides users with a quick and easy way to assess the quality and completeness of the archived data before proceeding with further analysis or querying.

Figure 6: Screenshot of the Data Preview feature in SDAS

Object Lock

SDAS includes a powerful feature that enables users to enable Amazon S3 Object Lock, a feature that allows objects to be stored using a WORM (Write Once, Read Many) model. This feature is designed for use in scenarios where it is critical that data is not modified or deleted after it has been written.

By enabling Amazon S3 Object Lock, users can ensure that their archived data is fully protected from accidental or malicious deletion or modification. This feature provides a powerful layer of security that helps to prevent data loss or corruption, ensuring that the archived data remains complete and accurate for future analysis and querying.

Figure 7: Screenshot of the Object Lock feature

Give SDAS a try!

1. Install the Simple Database Archival Solution in your AWS Account.
2. Send any issues, improvements, or suggestions to us at our GitHub page.
3. To help you get started, we have also published a self-guided workshop that walks through the installation and core features of SDAS. Thank you to James Gaines for their support in building the workshop.

Conclusion

The Simple Database Archival Solution (SDAS) offers organizations a comprehensive open source solution for archiving various types of databases, including Oracle, Microsoft SQL, and MySQL. With SDAS, businesses can easily and cost-effectively archive, validate, and securely store their data in Amazon S3. SDAS also provides users with various options for accessing and analyzing their archived data, making it a valuable tool for data analysis and reporting.

Additional thanks to Rohit Jagetia, Joe Cangialosi, James Gaines, and Duverney Tavares for their work on this solution.

Flatlogic Admin Templates banner

Creating full-stack web applications based on database schema for free!

Today, we’re excited to announce the free pricing plan for our CRUD tool. That means that more customers than ever before can use Flatlogic for creating a proper CRUD React/Vue/Angular web application based on the database schema.

What can you do with the free plan for the CRUD tool

You can expect the same features and functionality whether you choose our Paid access or Free option. But obviously with some limitations:

Create up to 10 applications on different technology stacks: React, Vue, Angular, Node.js, Laravel, PostgreSQL, MySQL
Create a full-fledged CRUD application (up to 3 database entities) with code written using best practices
Download or push source code to Github an unlimited number of times
Preview the code before downloading/pushing it on Github
Get updates on libraries used in your app stack
Host instantly your application demo and see the latest deployment logs

Free vs Paid access to the CRUD tool: Choose what you need

Since launching Flatlogic, we see constant growth in the creation of CRUD applications. But we understand that not all of our users need the full functionality of the CRUD tool. We also understand that in the modern world of developer tools, before investing huge resources in mastering new tools, you want to get some value here and now for free – with this motivation we introducing a free plan for creating CRUD applications.

Thus the free plan fits your needs. If you:

Want quickly prototype the CRUD app

Want to test or get familiar with new technologies before investing much time in them
See the best practice on how to organize modern CRUD apps using best practices
Prefer to use starter kits/boilerplates while starting CRUD web applications

And while our Professional plan has always offered a more enhanced way to create CRUD applications, it also required additional steps to understand your needs before getting access.

Now, you can sign up for a free account for a CRUD tool, create applications in minutes, and understand without any hassle whether Flatlogic fits your needs or not.

Create a CRUD app for free!

The post Creating full-stack web applications based on database schema for free! appeared first on Flatlogic Blog.Flatlogic Admin Templates banner

Starting a Web App in 2022 [Research Results]

We are finally happy to share with you the results of the world’s first study on how developers start a web application in 2022. For this research, we wanted to do a deep dive into how engineers around the globe are starting web apps, how popular the use of low-code platforms and what tools are decisive in creating web applications.

To achieve this, we conducted a survey with 191 software engineers of all experience around the globe. We asked questions around the technology they use to start web applications.

Highlights of the key findings:

The usage of particular technologies in the creation of web apps is closely related to engineers’ experience. New technologies, such as no-code/low-code solutions, GraphQL, and non-relational databases, appeal to developers with less expertise;

Engineers with less experience are more likely to learn from online sources, whereas developers with more expertise in software development prefer to learn from more conventional sources such as books;

Retool and Bubble are the most popular no-code/low-code platforms;

React, Node.js, PostgreSQL, Amazon AWS, and Bootstrap are the most popular web application development stacks.

To read the full report, including additional insights, and full research methodology, visit this page

With Flatlogic you can create full-stack web applications literally in minutes. If you’re interested in trying Flatlogic solutions, sign up for free

The post Starting a Web App in 2022 [Research Results] appeared first on Flatlogic Blog.Flatlogic Admin Templates banner

What is MySQL

MySQL: What is it?

MySQL is an open-source relational database management system that allows you to manage relational databases based on Structured Query Language (SQL) queries. It supports multiple platforms such as Windows, Ubuntu, Linux, macOS, etc. It was developed by Swedish company MySQL AB in 1994, which was acquired in 2008 by American tech company Sun Microsystems. Afterwards, in 2010 the American giant Oracle acquired Sun Microsystems, and since then MySQL de-facto belongs to Oracle.

The database is a structured set of data, for example, a straightforward shopping list or places to store massive quantities of information throughout a business network. The relational database is a digital repository that collects data and organizes it according to a relational model, where tables consist of rows and columns and the relationships between data items follow a strict logical structure. MySQL is a simple software toolkit we can use to perform, manage, and execute queries on such a database. 

Why use MySQL?

MySQL is the most popular RDBMS, let’s look at why this is like that:

Easy-to-use. The only thing you should learn before using MySQL is a basic knowledge of SQL (Structured Query Language).

Open-source. Virtually anyone can install, modify, and use MySQL because of its incredible ease of use. The source code uses the GPL, that is, the GNU General Public License, which specifies guidelines for what you can and can’t do with this application.

High Productivity. MySQL is possibly the fastest database language, according to a multitude of standard tests.

Scalability. MySQL supports multi-threading, meaning the ability of systems to easily operate on small and large quantities of data, clusters of machines, etc. 

Security. MySQL is composed of a strong security level of data that protects confidential data from attackers. The interface is also secure because it has a versatile password system and guarantees host-based validation before accessing the database. 

Multiple data types. MySQL contains many data types, like integers, float, double, char, varchar, text, blob, date, time, DateTime, timestamp, etc.

Community. The community is very large, so if you get stuck anywhere then you can get help from the community.

Client-Server Architecture. MySQL is a client-server based architecture and accessible from anywhere through networking, i.e. each machine communicates with the server via an Internet connection. The server handles requests from the client and returns the result to the client machine. Clients can send queries to remote servers using an Internet connection, but the main requirement is keeping the server active at the time.

Who uses MySQL

MySQL is the most popular and useful database system, the largest and most important companies are probably choosing it such as:

Uber
Twitter
Slack
Airbnb
Pinterest
Amazon

Using the Flatlogic Platform you can also generate an application with a MySQL database system.

How to create your app with Flatlogic Platform

Step 1. Choosing the Tech Stack

In this step, you’re setting the name of your application and choosing the stack: Frontend, Backend, and Database.

Step 2. Choosing the Starter Template

In this step, you’re choosing the design of the web app.

Step 3. Schema Editor

In this part you will need to know which application you want to build, that is, CRM or E-commerce, also in this part you build a database schema i.e. tables and relationships between them.

If you are not familiar with database design and it is difficult for you to understand what tables are, we have prepared several ready-made example schemas of real-world apps that you can build your app upon modification:

E-commerce app;
Time tracking app;
Books store;
Chat (messaging) app;
Blog.

Like all databases in MySQL, there are such types of table relationships as relation_one, relation_many. You can enforce the relationships by defining the right foreign key constraints on the columns.

Relation (one) – one-sided relation capable of storing one or another entity, for example, Employee: [{ name: ‘John’}].
Relation (many) – two-sided relation capable of storing any number of other entities, for example, Employee: [{ name: ‘John’ }, { name: ‘Joe’ }].

Afterwards, you can deploy your application and in a few minutes, you will get a fully functional CMS application with a MySQL database system.

The post What is MySQL appeared first on Flatlogic Blog.Flatlogic Admin Templates banner

What is PostgreSQL?

Introduction

Postgres (or PostgreSQL) is a powerful open-source relational database that supports both SQL (relational) and JSON (non-relational) querying. It was created by scientists from the University of California at Berkeley. It is a very stable object-oriented database management system. The PostgreSQL community has grown for over 20 years, contributing to its high stability, consistency, and correctness. 

At first, PostgreSQL was called Ingres. Afterward, the creators introduced further improvements and expanded its functionality, and changed the name to Postgres95 and finally to PostgreSQL.

Postgres became the 1st choice for corporations performing complex and volumetric high-data operations because of their powerful core technology, featuring MVCC (Multivariant Parallelism Control), in which multiple readers and writers work simultaneously on the system. Postgres has an extraordinary ability to solve several problems concurrently and effectively. That is why business giants like Yahoo!, Apple, Meta, major telecommunication companies, and financial and government institutions keep using PostgreSQL.

Postgres supports multiple programming languages and protocols, such as Ruby, Python, .Net, C/C++, Go, Java, ODBC.

Why use Postgres

Atomicity, Consistency, Isolation, and Durability (ACID) Support. Postgres is completely ACID compliant. It provides the ability to verify and maintain data integrity regardless of errors or network failures. Postgres ACID compliance qualifies it as a valid option for corporate, e-commerce, and applications requiring resiliency.

MVCC. Multi-Version Concurrency Control provides a unique feature of Postgres that allows users to simultaneously write and read data. Supporting MVCC is possible with other SQL databases, although usually problematic without other technology.

Queries. Postgres is the kind of database with the ability to be creative with custom queries. In case your model is complex, you can extend the queries to the database with custom functionality. This allows you easily query the data in specific ways that fit your model of an application.

Community support. Postgres has pretty strong support and extensive documentation. If you have any questions or problems, you can always reach out to the Postgres community.

Extensive support for data types. Postgres is object-oriented and therefore offers to write and read capabilities for all kinds of data structures. Custom, structured and non-relational data types are supported, such as JSON, BSON, primitive and geometric types. PostgreSQL is great at data scaling as well.

Security. Postgres offers a variety of security mechanisms, including user authentication and/or secure TCP/IP connections, all of which protect data in a high-performance way.

Who uses Postgres

Postgres is widely used in a variety of industries like the finanсial sector, Big Data for R&D, web applications, logistics.

Just because the database system is so great, the largest and most important companies are probably choosing it such as:

Apple
IMDb
Instagram
Reddit
Skype
Spotify
Twitch

Using the Flatlogic Platform you can also generate an application with a PostgreSQL database.

How to create your app with Flatlogic Platform

Step 1. Choosing the Tech Stack

In this step, you’re setting the name of your application and choosing the stack: Frontend, Backend, and Database.

Step 2. Choosing the Starter Template

In this step, you’re choosing the design of the web app.

Step 3. Schema Editor

In this part you will need to know which application you want to build, that is, CRM or E-commerce, also in this part you build a database schema i.e. tables and relationships between them.

If you are not familiar with database design and its difficult for you to understand what tables are, we have prepared several ready-made example schemas of real-world apps that you can build your app upon modification:

E-commerce app;
Time tracking app;
Books store;
Chat (messaging) app;
Blog.

Like all databases in PostgreSQL, there are such types of table relationships as relation_one, relation_many. You can enforce the relationships by defining the right foreign key constraints on the columns.

Relation (one) – one-sided relation capable of storing one or another entity, for example, Employee: [{ name: ‘John’}].
Relation (many) – two-sided relation capable of storing any number of other entities, for example, Employee: [{ name: ‘John’ }, { name: ‘Joe’ }].

Afterwards, you can deploy your application and in a few minutes, you will get a fully functional CMS application with PostgreSQL.

Suggested Articles

What is Webpack – Flatlogic Tech Glossary
How to Create a Vue Application [Learn the Ropes!]
What is Hosting and Domain Name – Flatlogic Blog

The post What is PostgreSQL? appeared first on Flatlogic Blog.Flatlogic Admin Templates banner

Send email from #SQL server using a #CLR function

Send Email SQL CLR

Send Email from a SQL CLR function

Although you can, and should use sp_send_dbmail to send email from SQL server, it’s often not quite as flexible as you need it to be. So here is a .NET CLR Function that you can install in your MSSQL server, in order to send an email using whatever additional configuration that you need.

You need to run these commands before installing the assembly

EXEC sp_changedbowner ‘sa’
ALTER DATABASE <your-database> SET trustworthy ON

CREATE ASSEMBLY [SendEmailCLR]
AUTHORIZATION [dbo]
FROM 0x4D5A90000300000004000000FFFF000…..
WITH PERMISSION_SET = UNSAFE;

CREATE PROCEDURE [dbo].[SendEmail]
@smtpServer NVARCHAR (MAX) NULL,
@smtpUsername NVARCHAR (MAX) NULL,
@smtpPassword NVARCHAR (MAX) NULL,
@from NVARCHAR (MAX) NULL,
@to NVARCHAR (MAX) NULL,
@subject NVARCHAR (MAX) NULL,
@body NVARCHAR (MAX) NULL
AS EXTERNAL NAME [SendEmailCLR].[SendEmailCLR].[SendEmail]

The full binary string is redacted here to save space, but you can get this from https://github.com/infiniteloopltd/SendEmailSQLCLR/blob/master/bin/Debug/SendEmailCLR_4.publish.sqlFlatlogic Admin Templates banner