Database, SQL database

Asked

Viewed 45 times

0

I am doing a job for the college whose goal is to create a table using Oracle Live SQLTrabalho a ser realizado

So far mine’s been like this:

create table ALUNO (   
  rgm      number(8),   
  nome          varchar2(50),   
  nome_pai      varchar2(50), 
  nome_mae      varchar2(50),
  dt_nascimento date,
  id_sexo       varchar(1),
  constraint pk_aluno primary key (rgm)   
);

create table MATRICULA (   
  rgm        number(8),
  cd_classe  number(8), 
  matricula date,
  constraint pk_matricula primary key (rgm), 
  constraint fk_matricula foreign key (cd_classe),
  references ALUNO (rgm)  
);

create table CLASSE (
cd_classe number(8),
Nr_anoLetivo number(4),
Nr_serie number(2),
Sg_turma varchar2(2),
Cd_escola number(6),
Cd_grau number(2),
Cd_periodo number(2),
Constraint pk_matricula primary key (cd_classe)
);

but I’m not sure if it’s right. If you can direct me to correct what’s missing or what’s wrong, I’ll be grateful!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.