PostgreSQL Data Generator

dbForge Data Generator is part of a powerful PostgreSQL GUI client aimed at creating massive volumes of meaningful, realistic test data. The instrument includes a large collection of predefined data generators with customizable configuration options that allow populating database tables with random data. The Data Generation feature allows users to:

  • Create vast amounts of realistic test data effortlessly
  • Fine-tune your data generation process with several distribution modes
  • Create, save, and use your data generators
  • Keep consistent data across multiple tables with data integrity support
  • Automate and schedule data generation routines with the command line
  • Select from a diverse spectrum of PostgreSQL column data types
  • Obtain an accurate real-time visualization of the generated data

How To Use Test Data and Why?

Database development is a combination of complex activities that work together to create a high-quality product. Testing is one of the most important procedures in this process. It is supposed to put a database in close-to-field conditions and detect any flaws before production goes down due to unexpected circumstances. In other words, testing helps convert such circumstances into preventable events and allows for quality assurance.

Support for Different PostgreSQL Data Types

Data Generator supports all kinds of PostgreSQL column data types:

  • bigint, integer, smallint, numeric, real
  • date, time, timestamp
  • character, character varying, text
  • json, point, polygon, uuid, and more
dbForge Studio for PostgreSQL - Supported data types

Multiple Generators with Data Customization

Enjoy a broad set of carefully catered individual generators for each supported data type that can save you quite a lot of time. However, if you need a specific data generator, the tool allows you to customize one precisely according to your needs. Make use of the customization options, including:

  • Number of NULL rows
  • Number of empty rows
  • Data uniqueness
  • Value ranges
  • Value distribution mode
dbForge Studio for PostgreSQL - Default and customizable data generators

Generate Random Date Range Series in PostgreSQL

The Data Generator feature of dbForge Studio for PostgreSQL offers predefined date generators that you can configure according to your particular needs. You can generate dates within the specified timeframe, set the values to be unique, include or exclude null values, and choose value distribution mode.

How to generate a random date range in PostgreSQL

Support for Basic Generators

Data Generator lets database developers generate and populate the selected tables or entire databases with realistic test data. The tool supports the following data generators:

  • Constant
  • Files Folder
  • Foreign Key
  • Lorem Ipsum
  • Regular Expression
  • Shuffled Text
  • SQL Query
  • Table or View
  • Text File
  • Twaddle
  • Weighted Lists
  • Python
Support for basic generators

Support for Meaningful Generators

With over 200 generators, the Data Generator tool can automate generating random data for PostgreSQL tables. The list of data generators includes but is not limited to:

  • IDs
  • Post codes
  • Phone numbers
  • Countries
  • Credit card numbers
  • E-mails
  • Social Security Numbers
  • First & Last Names
  • Product Categories
Support for meaningful generators

Create a Filename with a Timestamp

The Data Generator tool automatically includes a creation date and time in the file name with a data population script. However, the tool allows for excluding the timestamp from the name by clearing the Append timestamp to the file name checkbox. The file will be saved locally to the specified folder on your PC.

Create a filename with a timestamp

Generate Consistent PostgreSQL Data

Support for foreign keys generates consistent random data across multiple tables. Besides, it makes it possible to turn off triggers and constraints to avoid interference with database logic.

Foreign key support in Data Generator for PostgreSQL

Several Ways to Insert Random Data

The tool provides multiple data distribution modes that allow fine-tuning how you want to have your data generated. In particular, you can generate data in the following ways:

  • By the percent proportion of existing data
  • By the time specified
  • By using a linked table
  • By populating tables that already contain some data
  • By specifying the exact number of rows
Data distribution modes in PostgreSQL Data Generator

Save Your Generators for Next Time

You do not need to configure the data generation repeatedly every time you need this job done. If you have already created a generator that suits your needs perfectly in every aspect, you can save it for future use:

  1. Click Save Generator As.
  2. Type in the name of the generator.
  3. Describe what this generator is for.
  4. Click OK to save the generator in the User Defined group.
Save data generation settings

Real-time Preview of Test Data

A convenient preview pane of Data Generator for PostgreSQL gives you real-time visualization of the changes you make while adjusting data generation settings. This way, you will be able to make a visual assessment of the data that will be generated.

Preview the data to be generated within Data Generator for PostgreSQL

Use PostgreSQL CLI for Data Generation

With the command-line functionality, you can save time by scheduling routine data generation tasks. The tool also allows creating a command-line execution file to run routine database documentation tasks with a single click.

The command-line execution file in dbForge Data Generator for PostgreSQL

Conclusion

dbForge Studio for PostgreSQL is a very handy tool to have in your arsenal when it comes to data export and import, database development and testing, and query optimization and cleaning up your code. The Data Generator feature helps create large volumes of meaningful test data with no hustle. Moreover, the solution will save you hours of manual data population and allow you to profit from new time slots. dbForge Studio is capable of generating all kinds of data. Whether it is text, images, addresses, dates, or names of people, it is an indispensable IDE for any software development process involving a database.