[Benchmark php frameworks]. Part 2. Database scheme and generating data for testing app.

in #programming7 years ago (edited)

Hello.

As I wrote in my previous post, that app for benchmarking will be not so complicated.

First version of application.

As usual, main task of app (site for example) it is show information from referenced tables. For our simple app it's enough. How about simple blogs app without posting, just showing information. That app can be write on every framework "from a box"

Let's see our pages for testing.

  • /authors - lists of authors with posts counts.
  • /categories - list of categories with counts of posts in every one.
  • /posts - all posts with information about types, authors and categories.
  • /index - simple "hello world" for comparison

Quantity of notes about 1000. Authors and categories - 50-100pc.

Let see to database scheme

Scheme of tables and references

As we can see from scheme:

  • Tables quite simple;
  • Post has several "Categories"
  • Post has one "Author" and one "Type".

References with seceral categories will allow us to complicate the selection and display of data.

For example: In displaying page /post used all 5 tables, but for page /authors use only 2 tables: authors and posts.

Let's start generating data for testing.

AT first i found service for generating not more 1000pc for free. And I decide to use it.

Links - settings for data generation.

In this service we can use Ruby language and regex for generate data and there are alot of ready-made types of data (Address, Names, Dates, Money and etc.)

There is API for taking data by curl :
curl "https://www.mockaroo.com/ab227010/download?count=50&key=24c35200" > "authors.sql".

I think that For beginning this data is enough.

In Results

We have simple app only for displaying information.

In the future I will introduce more functionality and interaction. For example, I plan to select posts by date, integrate pager functional, generate new data in benchmark process and maybe the community can suggest something.

Nex post will be about Phalcon bencmark.

Thanks for voting and resteeming.

Coin Marketplace

STEEM 0.21
TRX 0.13
JST 0.030
BTC 68014.74
ETH 3533.72
USDT 1.00
SBD 2.81