MySQL Best Practices

MySQL Best Practices

Coding, Guide
Database operations often tend to be the main bottleneck for most web applications today. As programmers need to do our part by structuring tables properly, writing optimized queries and better code. Table Names By convention, the "snake case" in lowercase (no PascalCase - we're not using Microsoft SQL Server here!), plural name of the class will be used as the table name unless another name is explicitly specified. Tables should also be named based on their respective contents. Try to avoid naming tables based on a single use case and think more about how that table will be expanded in the future. If you're not sure how to name the table ask your manager before creating it. eg: To find an order product we would look in the order_products table  Primary Keys The…
Read More