I'm trying to translate a class diagram (school project of disc rental store) to sql, but I'm stuck on a generlization relationship.
I have the parent class of Disc, and child classes of Music, Movie and Game. How can I represent these in sql (oracle)?
What I've written so far is:
CREATE TABLE Disc
(
disc_id numeric(10) not null,
disc_title varchar2(50) not null,
disc_cost numeric(10) not null
CONSTRAINT disc_pk PRIMARY KEY (disc_id)
);
--extends Disc
CREATE TABLE Music
(
);
Yet I have no idea what to do with the Music table, or even if I'm going in the wrong direction.. or even if I'm using the wrong terminology :P
Any help would be appreactiated :)