FrontPage 

TB Wiki

Login

Regression Test

Expected HTML for page "HowTo_make_a_new_database"


expected html
nothing
t1This document describes how to make a new database in TB Wiki.t
2<p>
3TB Wiki was designed specifically to make this as easy as possible, using
4regular wiki files as the records for the database.  This page is intended
5to be a quickstart guide to setting up a simple database.  For complete
6documentation, see <a href="/tbwiki/DocTables">DocTables</a>
7<p>
8<h2><a name="Table_Type">Table Type</a>
9<span align=right class="section_edit_link">[<a href="/tbwiki/HowTo_make_a_new_database?action=edit&section=Table_Type">edit section</a>]</font></span>
10</h2>
11First, determine the table type - single file or multi-file.
12<p>
13You can edit the database in a single file, or have a database consist of
14multiple files.  If the records are large, and have lots of free-form text,
15it is usually better to put them into separate files.
16<p>
17<h2><a name="single-file">single-file</a>
18<span align=right class="section_edit_link">[<a href="/tbwiki/HowTo_make_a_new_database?action=edit&section=single-file">edit section</a>]</font></span>
19</h2>
20For a single file database, just create a page to hold the table of data,
21and start a table in TB wiki inline table format:
22<p>
23like so:
24<pre>
25{{{!Table:contacts
26||name||address||phone||
27||Tim||123 Main St.||555-5555||
28||Frank||456 State Ave.||666-6666||
29} }}
30</pre>
31<p>
32<h3><a name="multi-file">multi-file</a>
33<span align=right class="section_edit_link">[<a href="/tbwiki/HowTo_make_a_new_database?action=edit&section=multi-file">edit section</a>]</font></span>
34</h3>
35For a multi-file database, you need to decide on a page prefix to use
36for the data files.  Each record of the database will reside on it's
37own page in the wiki, and you can use a Table processor to collect
38them into a view of the data.
39<p>
40Let's say you create a contacts database, and use "contacts_" as the
41file prefix. Specify this with a "source_spec=contacts_.*"
42(<i>Note the '.' in the wildcard for the page name</i>)
43Each file in the database has a single record from the database
44in TB wiki name-attr format (these are referred to as attribute files).
45<p>
46The following files might be defined:
47<p>
48"contact_1" would have the following content:
49<pre>
50record=1
51name=Tim
52address=123 Main St.
53phone=555-5555
54description="""you could put
55a mult-line description here"""
56</pre>
57<p>
58"contact_2" would have the following content:
59<pre>
60record=2
61name=Frank
62address=456 State Ave.
63phone=666-6666
64</pre>
65<p>
66<p>
67<i>Note that not every record needs to define every field</i>
68<p>
69Then, create a separate page to have a view of the table, like so:
70<p>
71"Contacts", would have the following content:
72<pre>
73{{{!Table:contacts
74source_spec=contact_.*
75cols=record_id:name:address:phone:description
76sortby=name:alpha
77} }}
78</pre>
79<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "HowTo_make_a_new_database"


expected html
generated html
t No Differences Found t No Differences Found 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Update saved output

Back to diff page

Return to Regression_Test page
TBWiki engine 1.9.3 by Tim Bird