Aprenda a criar um SIMPLES SCM (Source Control Management). Bem que poderia ser SGCCF (Sistema de Gerenciamento e Controle de Código Fonte)
COMMIT:
id
SHA-1/SHA-2 Identificator (ID)parent_id
COMMIT parent IDauthor
Author information (name )datetime
Timestamp date and time informationdescription
User description
POINTER:
name
Pointer name (alias for COMMIT)commit_id
COMMIT ID
COMMIT_OBJECT:
commit_id
COMMIT IDobject_id
OBJECT ID
OBJECT:
id
OBJECT IDtype
Object type (BLOB or NODE )name
Object namenode_id
NODE IDblob_id
BLOB IDNever $node_id and $blob_id simultaneously filled Never $node_id and $blob_id simultaneously empty
NODE:
id
NODE IDauthor
Author of the node changedatetime
Timestamp date and time information
BLOB:
id
BLOB IDtype
${RESERVED = (TEXT or BINARY)}author
Author of the blob changedatetime
Timestamp date and time informationcontent
Blog content (diff)
+--------+ +---------------+ +--------+
| COMMIT | [1]-----[0..*]-<< | COMMIT_OBJECT | >>-[0..*]-----[1] | OBJECT |
+--------+ +---------------+ +--------+
[1] [1] [1]
| | |
| | |
[0..*] [0..1] [0..1]
\ / \
/\ /\ /\
+---------+ +------+ +------+
| POINTER | | NODE | | BLOB |
+---------+ +------+ +------+