若要編輯、建立及設定方案,請按一下 Administration > Configuration > Data schemas Adobe Campaign使用者端主控台的節點。
內建資料結構描述只能由Adobe Campaign Classic主控台的管理員刪除。
編輯欄位會顯示來源結構描述的XML內容:
「名稱」編輯控制項可讓您輸入由名稱和名稱空間組成的結構描述金鑰。 結構描述根元素的「名稱」和「名稱空間」屬性會在結構描述的XML編輯區域中自動更新。
預覽會自動產生延伸的結構描述:
儲存來源結構描述後,就會自動產生延伸結構描述。
如果您需要檢查架構的完整結構,可以使用預覽索引標籤。 如果結構描述已擴充,您隨後將能夠將其所有擴充功能視覺化。 作為補充,「檔案」標籤會顯示所有綱要屬性和元素及其屬性(SQL欄位、型別/長度、標籤、說明)。 檔案索引標籤僅適用於產生的結構描述。 如需詳細資訊,請參閱 重新產生結構描述 區段。
在以下範例中,我們想要為 合約 在Adobe Campaign資料庫的資料庫模型中。 此表格可讓您儲存每個合約的持有者和共同持有者的名字和姓氏,以及電子郵件地址。
要執行此操作,您需要建立表格的綱要,並更新資料庫結構以產生對應的表格。 套用下列階段:
編輯 Administration > Configuration > Data schemas Adobe Campaign樹狀結構的節點,然後按一下 New .
選擇 Create a new table in the data model 選項並按一下 Next .
指定資料表的名稱和名稱空間。
依預設,使用者建立的方案會儲存在「cus」名稱空間中。 有關詳細資訊,請參閱 結構描述的識別.
建立表格的內容。 我們建議使用輸入精靈來確認沒有遺漏任何設定。 若要這麼做,請按一下 Insert 按鈕,並選擇要新增的設定型別。
定義合約表格的設定:
<srcSchema desc="Active contracts" img="ncm:channels.png" label="Contracts" labelSingular="Contract" mappingType="sql" name="Contracts" namespace="cus" xtkschema="xtk:srcSchema">
<element desc="Active contracts" img="ncm:channels.png" label="Contracts" labelSingular="Contract"
name="Contracts" autopk="true">
<attribute name="holderName" label="Holder last name" type="string"/>
<attribute name="holderFirstName" label="Holder first name" type="string"/>
<attribute name="holderEmail" label="Holder email" type="string"/>
<attribute name="co-holderName" label="Co-holder last name" type="string"/>
<attribute name="co-holderFirstName" label="Co-holder first name" type="string"/>
<attribute name="co-holderEmail" label="Co-holder email" type="string"/>
<attribute name="date" label="Subscription date" type="date"/>
<attribute name="noContract" label="Contract number" type="long"/>
</element>
</srcSchema>
新增合約型別,並將索引置於合約編號上。
<srcSchema _cs="Contracts (cus)" desc="Active contracts" entitySchema="xtk:srcSchema" img="ncm:channels.png"
label="Contracts" labelSingular="Contract" name="Contracts" namespace="cus" xtkschema="xtk:srcSchema">
<enumeration basetype="byte" name="typeContract">
<value label="Home" name="home" value="0"/>
<value label="Car" name="car" value="1"/>
<value label="Health" name="health" value="2"/>
<value label="Pension fund" name="pension fund" value="2"/>
</enumeration>
<element autopk="true" desc="Active contracts" img="ncm:channels.png" label="Contracts"
labelSingular="Contract" name="Contracts">
<attribute label="Holder last name" name="holderName" type="string"/>
<attribute label="Holder first name" name="holderFirstName" type="string"/>
<attribute label="Holder email" name="holderEmail" type="string"/>
<attribute label="Co-holder last name" name="co-holderName" type="string"/>
<attribute label="Co-holder first name" name="co-holderFirstName" type="string"/>
<attribute label="Co-holder email" name="co-holderEmail" type="string"/>
<attribute label="Subscription date" name="date" type="date"/>
<attribute desc="Type of contract" enum="cus:Contracts:typeContract" label="Type of contract"
name="type" type="byte"/>
<attribute label="Contract number" name="noContract" type="long"/>
<dbindex name="noContract" unique="true">
<keyfield xpath="@noContract"/>
</dbindex>
</element>
</srcSchema>
儲存結構描述以產生結構:
更新資料庫結構以建立將連結結構描述的表格。 有關詳細資訊,請參閱 更新資料庫結構.