Fixed indentation

Signed-off-by: Michal Čihař <michal@cihar.com>
Simplify code as zero length array is empty as well

Signed-off-by: Michal Čihař <michal@cihar.com>
Add missing space

Signed-off-by: Michal Čihař <michal@cihar.com>
RFE-759 Use aliases in SQL export for tables and columns

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>