Search the FirstSpirit Knowledge Base
Hello,
Is there way to implement the composite primary key in the First Spirit (Java Client)??
Thank You,
Vasanth.
Hello,
it is not possible to implement composite primary keys in FirstSpirit.
How and why do you want to use them? Maybe there is another way to design the database structure which fits your needs?
Regards,
Rouven
Hello Rouven,
I have a table in my schema and i want to create composite key in the sense combination of two column as a primary key. So that combination won't be repeated again.
Eg:
Table
===========
Student Name| Student Number
-------------------------------------------
Demo | 123456
In my requirement i have make sure that no duplicates of the two records.
Thank You,
Vasanth
Hello Vasanth,
if you create the database within FirstSpirit the primary key will always be the column "fs_id".
You can use constraints to ensure that those columns are unique. Those constraints must be set manually on the database. The way you define the constraints depends on the database you are using. The documentation of the particular database helps to create them.
If you have configured your database with constraints on the columns the editor will get an exception if he tries to create an entry where this combination of student-name and -number already exists.
Regards,
Rouven
Thanks a lot rouven !!!!!!!!!