@KD1 , One observation is, In both cases the deptid will act as a primary key and it won't allow to insert a duplicate deptid record. However, If you define internal="true", then in Schema structure (in client console UI) you can able to see a key icon near to the attribute.
If it is not defined, t...