How to create an object table [message #659536] |
Fri, 20 January 2017 09:49 |
|
janeya3110@gmail.com
Messages: 2 Registered: January 2017
|
Junior Member |
|
|
Data to store:
Cars
Car_Model Year Driver
Swift 2015 Ram
I20 2016 Ram
Hcity 2002 Arun
C300 2008 Arun
Amaze 2004 Raj
Drivers :
Driver_Name Salary Cars
Ram 12000 Swift, I20
Arun 11000 Hcity,C300
Raj 1000 Amaze
There is only one table allowed to use for storing all the data:
CREATE TABLE objects ( object VARCHAR2 (100) NOT NULL ,
attribute VARCHAR2 (100) NOT NULL ,
value VARCHAR2 (100) );
ALTER TABLE objects ADD CONSTRAINT attribute_PK PRIMARY KEY ( object, attribute );
[mod-edit: code tags added by bb; next time please do so yourself]
[Updated on: Fri, 20 January 2017 13:09] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|