Guest User

Untitled

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. create table M_VENDEDORES (
  2. ID_VENDEDOR number (10,0) not null,
  3. NOME varchar2 (100) not null,
  4. CPF number (11,0) not null,
  5. ENDERECO varchar2 (100) not null,
  6. NUMERO varchar2 (10) not null,
  7. CEP number (11,0) not null,
  8. constraint PK_VENDEDOR PRIMARY KEY (ID_VENDEDOR),
  9. constraint UK_CPF unique (CPF)
  10. );
  11.  
  12. create table M_VENDAS (
  13. ID_VENDEDOR number (10,0) not null,
  14. MES varchar2 (100) not null,
  15. VENDAS number (10) not null,
  16. constraint FK_ID_VENDEDORES foreign key (ID_VENDEDOR)
  17. references M_VENDEDORES (ID_VENDEDOR)
  18. );
  19.  
  20. create table M_FORNECEDORES (
  21. ID_FORNECEDOR number (10,0) not null,
  22. NOME varchar2 (100) not null,
  23. CNPJ number (14) not null,
  24. constraint PK_FORNECEDOR PRIMARY KEY (ID_FORNECEDOR)
  25. );
  26.  
  27. create table M_ESTOQUE (
  28. ID_FORNECEDOR number (10,0) not null,
  29. ID_ITEM number (10,0) not null,
  30. NOME varchar2 (100) not null,
  31. MODELO varchar2 (100) not null,
  32. TAMANHO varchar2 (10) not null,
  33. MARCA varchar2 (100) not null,
  34. ESTOQUE number (100) not null,
  35. constraint PK_ITEM PRIMARY KEY (ID_ITEM),
  36. constraint FK_ID_FORNECEDOR foreign key (ID_FORNECEDOR)
  37. references M_FORNECEDORES (ID_FORNECEDOR)
  38. );
Add Comment
Please, Sign In to add comment