September 2017
Intermediate to advanced
244 pages
6h 44m
English
A blog post can have the following fields:
id : It will have type integer. It will be unique and have auto-incremented values. id will be the primary key of the blog post.
title: It will have type varchar with a length of 100 characters. In the case of varchar 100, 100 characters is the limit. If one post title will be less than 100 characters, let's say a post's title takes only 13 characters, then it will occupy 14 character's space. It is how varchar works. It occupies one character more than the actual characters in the field.
status: Status will be either published or draft. We will use enum for it. It has two possible values, published and draft.
content: Content will be the body of the post. We will use ...
Read now
Unlock full access