The fifth section of Web Form designer based on ExtJS--Database design

Source: Internet
Author: User

The contents of the Form Designer series are listed here, and the contents of sections 6, 7 and 8 should be out of time after the Spring Festival. Because this weekend on leave to go back to my hometown, prepare for my wedding event. I wish you a happy Spring festival in advance!

Web form designer based on ExtJS

ExtJS - based Web Form Designer Section one

ExtJS -based Web Form Designer Section II - design of form controls

ExtJS -based Web Form Designer Section III - control drag and drop

ExtJS -based Web Form Designer Section fourth - control drag and drop

ExtJS -based Web Form Designer Section fifth - Database design

The sixth section of Web form designer based on ExtJS - - interface Framework Design

The seventh section of Web form designer based on ExtJS - - The design of the formula of taking number

ExtJS -based Web Form Designer Section eighth -- design of the form engine

In section three--control drag and drop a blogger named Enjoyeclipse asked how the background database was designed and how the database fields are bound to the interface controls. In this section I will describe the background database design of the form designer, as well as form controls and database relationships.

The

Form designer's template is stored in a database using three tables, respectively, Formtemplate (table Template table), (table item Grouping table), formtemplateitem (form template item--that is, a control in our designer). the previous diagram gives a diagram of the form template, the form item grouping, and the form item.  

We can see that a formtemplate can contain N formitemgroup, a Formitemgroup can contain N formtemplateitem, which in turn are 1 : N the relationship.

Formtemplate table (contains some basic information about the form template)

Field name

Type

Nullable (y/n)

Describe

Id

Varchar (36)

N

Primarykey

Name

Varchar (50)

N

form template Name

Code

Varchar (50)

N

form template Encoding

Createdt

Datetime

N

Template creation Time

Createuserid

Varchar (50)

N

Create Person Id

Createuserdeptid

Varchar (50)

N

Id of the person who created your department

Status

Int

N

Status of the template

Version

Varchar (50)

N

Template version number

Url

Varchar (100)

Y

Path to template (external hook-up form path)

Jsfunc

Text

Y

Template Customization Methods

Description

Varchar (200)

Y

Template description

Formitemgroup table (contains some basic information about the grouping of form template items, that is, our Area Control store table)

Field name

Type

Nullable (y/n)

Describe

Id

Varchar (36)

N

Primarykey

GroupName

Varchar (50)

N

Group name

Formtemplateid

Varchar (36)

N

form template ID

Groupcols

Int

Y

Number of area columns, primarily for card area controls

GroupOrder

Int

N

Sorting by grouping

GroupType

Varchar (20)

N

Type of grouping

Isshowborder

Bit

N

Whether to show grouped borders

Isshowgroupname

Varchar (50)

N

Whether to display group names

Parentgroupid

Varchar (100)

Y

Parent group ID

Formtemplateitem Table (some basic information that holds the form template item)

Field name

Type

Nullable (y/n)

Describe

Id

Varchar (36)

N

Primarykey

Name

Varchar (50)

N

form template Item Name

Formtemplateid

Varchar (36)

N

form template ID

Formitemgroupid

Varchar (36)

N

form template Group ID

Resourcetypeid

Varchar (36)

Y

Resource Id

Align

Varchar (36)

N

On its way

ColSpan

Int

Y

Number of columns occupied (controls for card area)

Type

Varchar (36)

N

control type

Sumtype

Varchar (36)

Y

Summary type

DefaultValue

Varchar (100)

Y

Default value

Valuerange

Varchar (500)

Y

Range of values

Formula

Varchar (500)

Y

Formula

ParentColumn

Varchar (36)

Y

Parent column Id(for grouping columns inside the Table area)

Isfill

Bit

N

is required

Ishide

Bit

N

Whether to hide

IsReadOnly

Bit

N

is read-only

Width

Int

Y

Width (for Table area columns)

Listorder

Int

N

Sort

Maxlenth

Int

Y

Maximum length

Scale

Int

Y

Number of decimal digits (for amount, number control)

These three tables make up the storage structure of our form template. As for how the business data generated by the form instance is stored, this is not described in detail, as there are specific business areas involved. For example, simple business, you can directly stored in a table can be, complex business, upstream and downstream business may need to design a more complex storage structure relationship and our form template three data tables for docking use to complete the specific business data collection.

The fifth section of Web Form designer based on ExtJS--Database design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.