The first step of system design is of course the analysis of requirements, the current can think of is the management of the log, uh ... Plus a sort of a good, basically like this:
We use an XML to describe the two entities:
1: <?xml version= "1.0" encoding= "Utf-8"?> 2: <entities xmlns= "Http://it.ouc.edu.cn/EntityDescription/V 2 "> 3: <entity title=" log "name=" blog "module=" Blogs "> 4: <item title=" title "Name=" title "type=" text "requ Ire= "true"/> 5: <item title= "Contents" name= "Content" type= "Longtext" require= "false"/> 6: <item title= "belong to Category "Name=" Blogclass "type= entity" entityname= "Blogclass" require= "false"/> 7: <item title= "Create Time" name= "Createda" Tetime "type=" datetime require= "true"/> 8: <item title= "Update Time" name= "Updatedatetime" type= "datetime" require = "true"/> 9: </Entity> <entity title= "Log Classification" name= "Blogclass" module= "Blogs" > One: <item title = "name" name= "name" type= "text" require= "true"/>: <item title= "description" name= "Description" type= "text" require= "false "/> </Entity>: </entities>
This XML is easy to read, its schema is defined in "http://it.ouc.edu.cn/EntityDescription/V2", and the root node indicates that the XML defines a collection of entities (entities). Each entity contains a lot of data fields, the field has a title, name, type and other attributes, it should be noted that the data field here does not represent the database design, and does not represent the design of the class, but the business logic definition of the entity.