• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

extract values

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CREATE TABLE special
(
id serial NOT NULL,
specialname varchar(50),
CONSTRAINT special_pk PRIMARY KEY (id)
)

CREATE TABLE person
(
id serial NOT NULL,
name varchar(60),
qualification varchar(100),
exp int4,
history text,
CONSTRAINT person_pk PRIMARY KEY (id)
)


CREATE TABLE person_spec_group
(
fk_person int4 NOT NULL,
fk_special int4 NOT NULL,
CONSTRAINT person_spec_group FOREIGN KEY (fk_person) REFERENCES person (id) ON UPDATE RESTRICT ON DELETE RESTRICT,
CONSTRAINT special_spec_group FOREIGN KEY (fk_special) REFERENCES special (id) ON UPDATE RESTRICT ON DELETE RESTRICT
)

special table
to store the specialname
person table to store the details of a person
person_spec_group table to store the ids of special table and person table

How to works this or how to write action class and SQL query?
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic