content management system - designing a web-cms database for an assignment -


i designing database system web cms. have added "status" column in "content" table shows status of each content in time. know there special values status can accept : 'draft', 'comment waiting', authorizing pending' and... want create check constraint make column accept above values. correct work? whole of status values can use in constraint?

use enum() data type of status column. e.g.:

create table example (    ...    status enum('draft','comment waiting','etc.') not null,    ... ); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -