Download the PHP package daniloromka/eav without Composer

On this page you can find all versions of the php package daniloromka/eav. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eav

EAV - jsonb

This is project is an implementation of the EAV (Entity-Attribute-Value) model based on PostgreSQL database using jsonb type.

This EAV-model combines the power of a relational database with the search speed of a non-relational database.

The idea was written here: https://coussej.github.io/2016/01/14/Replacing-EAV-with-JSONB-in-PostgreSQL/

Getting started

1. Basis

1.1. Creating the structure

Run this console command to create EAV model tables in the database (need use the correct DSN value to connect to the PostgreSQL database):

Will be output:

Successfully completed.

The result will be creating of 5 tables in your database with the prefix eavjsonb_:

Note: You can add PDO_PGSQL_DSN setting to your .env file (see .env.example file)

1.2. Test data generation

Test data is needed here. Test data can be generated by the following console command:

Will be output:

Estimated execution time: 15 min

Successfully completed.

The result will be 10 million created entities with different attributes and values.

1.3. Data selecting test

You can test of data selecting from the EAV model by running the console command:

The test result can be as follows:

Total records count: 10000000

Filtered records count where {"1":"Value 1"}: 1

Execution time: 4728.9 ms

2. Adding indexing

2.1. Next, run this console command to adding indexing in the database:

The result of execution will be the creation index for jsonb field:

Estimated execution time: 18 min

Successfully completed.

2.2. Then it can be tested again by running the console command:

Now the test result will be as follows:

Total records count: 10000000

Filtered records count where {"1":"Value 1"}: 1

Execution time: 0.8 ms

This is a stunning result! This is less than 1 ms per 10 million records!

Implementation

You can use your migration mechanism to pull changes from the database after creating the EAV model tables.

Alternative implementation

Alternative is manual creating your migration with SQL-queries which is in the src/Migration/Setup*.php files.


All versions of eav with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
ext-pdo Version *
ext-pdo_pgsql Version *
php Version ^5.0 || ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daniloromka/eav contains the following files

Loading the files please wait ....