Skip to content

Rules of Persistence Layer (DB Schema) Meeting Minutes

Meeting Info

Date 2022-05-26
Topic First Use Doc Framework & Rules of Persistence Layer
Attendee Calvin Yan, Selly Huang, Rocky Chi, Daniel Zhou, Ted Zhao, Jackson Liu, Albert Wang
Note Taker Jackson Liu
Timer Daniel Zhou
Duration 45 minutes

Meeting Agenda

  1. Brief discussion and feedback about your first get started with our Doc Framework (10 minutes) - Internal feedback (and enhancement) is important to us if we want to promote it to our Big team.
  2. Continue discuss about rules of persistence layer (30 minutes) - DB Rules - Schema, Table, Column… - SQL Rules - How to write SQL - ORM Rules - Best practice of using ORM frameworks like MyBatis - Index Rules - Make good use of index

Meeting Minutes / Action Items:

First use doc framework

The feedback from the group members: - Internal support, not need another API. - Using docker to reduce the effort when setup the project. - A little complex (different format from the current MkDoc) to write the internal redirect link (relative url). - Has advanced function to customize the style (like different button style). - The style of header 4 looks a little strange. Do not use. - Discuss about adding To-do lists.

Rules of persistence layer

  • Recommend: use is_xxx to represent the content field, the data type is unsigned tinyint(1: true, 0:false).
  • Mandatory: table name and variables Use lower case, underline, and number.
  • Mandatory: table name should not use plural countable nouns.
  • Mandatory: not use reserved words.
  • Mandatory: primary key: pk_, unique key: uk_, index: idx_.
  • Recommend: use decimal, no float or double.
  • Mandatory: use char to store String with specific length.
  • Mandatory: use varchar to store mutable String. The length should less than 5000.

Some advice

We could share one code rule / tip on every daily meeting. (background, meaning)