var Student = persistence.define('Student', {
refid: "TEXT",
firstName: "TEXT",
lastName: "TEXT"
});
var Table = persistence.define('Table', {
size: 'INT',
location: 'INT',
sectionid: 'TEXT'
});
var Section = persistence.define('Section', {
refid: 'TEXT',
name: 'TEXT',
longName: 'TEXT'
});
Student.hasMany('tables', Table, 'students');
Table.hasMany('students', Student, 'tables');
Section.hasMany('tables', Table, 'section');
Section.hasMany('students', Student, 'sections');
Student.hasMany('sections', Section, 'students');
Student.index(('refid'),{unique:true});
Section.index(('refid'),{unique:true});