[ChatGPT] 생성시간 변수명 뭘로할까?!steemCreated with Sketch.

in hive-137029 •  2 years ago 

데이터베이스에서 필드명을 정할때는 항상 고민입니다.
회사에서 많이 사용하는 규칙을 사용하고 정해진게 없으면 이것저것 사용했는데요
이걸 나만의 비서! ChatGPT 에게 물어봤습니다.

굉장히 설득력있게 이야기해서 created_at 으로 가려고합니다!!

image.png

I am worried about the DB field name.
Which variable name should I use to represent the generated time?

It's a common practice to use "created_at" or "createdAt" to represent the generated time in a database field. Another option could be "timestamp", but this can be ambiguous as it can represent either the creation time or an updated time.

Which do you prefer, "created_at" or "create_at"?
And what is the difference?
I would recommend using "created_at". The difference between "created_at" and "create_at" is that "created_at" is the past participle form of "create", and it correctly conveys that the field represents the time a record was created. On the other hand, "create_at" is not a grammatically correct form and could lead to confusion.

It's a widely adopted convention in database design to use snake_case for field names, and "created_at" is a commonly used field name in many databases and frameworks.
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

[광고] STEEM 개발자 커뮤니티에 참여 하시면, 다양한 혜택을 받을 수 있습니다.

image.png