As of now community edition only have the option for creating product attribute from admin side. But for creating custom magento2 catalog , customer attribute is not available in admin side . So either we will use custom script or
magento convert attribute type

As you know magento table structure is been built upon EAV (Entity Attribute Value) structure. Magento uses EAV to add more number of fields to table dynamically. Just to get one single record, Magento joins 4-5 tables to get data
Reindexing in magento programmatically

Good way to re-index data in magento without admin panel is SSH.Also I have been locked in admin panel and unable to reindex all data the SSH is the good practice to do.Sometime if we don’t have access to SSH