pillai.ganesh
28th February 2012, 07:51
A primary key is a single field or combination of fields that uniquely defines a record. None of the fields that are part of the primary key can contain a null value. A table can have only one primary key.
Indexes facilitate speedy searching and sorting of database tables. An index is a special kind of file (or part of a file) in which each entry consists of two values, a data value and a pointer. The data value is a value for some field in the indexed table. The pointer identifies the record that contains this value in the particular field.
***************************************
In Baan - every table must have at least one index, which is an index on the primary key field(s). This is referred to as the primary index. An index on any other field(s) is referred to as a secondary index.
The Primary index fields are supposed to be ‘NOT NULL ‘ (i.e. Mandatory) fields; but Baan allows us to keep these fields as ‘NOT Mandatory’. Hence allowing us to create a record in the table having Primary Key fields with NULL values.:confused:
Example:
Table :Employee
Table DESC:
1. Empno - Not Mandatory – Primary Key – Primary Index
2. EName
3. XYZ….Fields
This will allow the table to have corrupt record. :(

Hitesh Shah
28th February 2012, 17:43
If u insert records through baan , there will not be any corruption as baan driver takes care of supplying appropriate not null value like spaces or 0 . If however u work outside baan , such possibility could always be possible , if the outside program does not take care off such not mandatory fields with spaces or 0.