Sql udesc
Diego P. Bonano Luiz Torres Tony Hass
SQL
CREATES
PROFESSOR
BEGIN
CREATE TABLE [dbo].[PROFESSOR](
[matricula] [int] NOT NULL, [nome] [nvarchar](50) NOT NULL, [centro] [nvarchar](10) NOT NULL, [dpto] [nvarchar](10) NOT NULL,
[semestre] [nvarchar](5) NOT NULL,
[catego_func] [nvarchar](10) NOT NULL, [titulacao] [nvarchar](10) NOT NULL, [regime] [nvarchar](10) NOT NULL, [classe] [nvarchar](10) NOT NULL, CONSTRAINT [PK_PROFESSOR] PRIMARY KEY CLUSTERED ( [matricula] ASC ) ) ON [PRIMARY] END GO
19/05 2
CREATES
ORIENTAÇÃO
CREATE TABLE [dbo].[AT_ORIENTACAO]( [cod_at] [int] IDENTITY(1,1) NOT NULL, [codpro] [int] NOT NULL, [modalidade] [nvarchar](10) NOT NULL, [nm_orientado] [nvarchar](50) NOT NULL, [curso_hab] [nvarchar](30) NULL, [fase] [char](2) NOT NULL, [ch_semestre] [int] NOT NULL, CONSTRAINT [PK_AT_ORIENTACAO] PRIMARY KEY CLUSTERED (
[modalidade] ASC,
[nm_orientado] ASC, [fase] ASC ) ) ON [PRIMARY]
19/05
3
CREATES
EXTENSÃO
CREATE TABLE [dbo].[AT_EXTENSAO]( [cod_at] [int] IDENTITY(1,1) NOT NULL, [codpro] [int] NOT NULL, [categoria] [nvarchar](200) NOT NULL, [carga_horaria] [decimal](4, 2) NULL, [autorizacao] [nvarchar](25) NULL, [dt_inicio] [date] NOT NULL, [dt_fim] [date] NOT NULL, CONSTRAINT [PK_AT_EXTENSAO] PRIMARY KEY CLUSTERED (
[cod_at] ASC
) ) ON [PRIMARY] ALTER TABLE [dbo].[AT_EXTENSAO] WITH CHECK ADD CONSTRAINT [FK_AT_EXTENSAO_PROFESSOR] FOREIGN KEY([codpro]) REFERENCES [dbo].[PROFESSOR] ([matricula]) ALTER TABLE [dbo].[AT_EXTENSAO] CHECK CONSTRAINT [FK_AT_EXTENSAO_PROFESSOR] 19/05
4
CREATES
ENSINO PROJ
CREATE TABLE [dbo].[AT_ENSINO_PROJ]( [cod_at] [int] IDENTITY(1,1) NOT NULL, [codpro] [int] NOT NULL, [projeto] [nvarchar](50) NOT NULL, [carga_horaria] [decimal](4, 2) NOT NULL, [autorizacao] [nvarchar](25) NOT NULL, [dt_inicio] [date] NOT NULL, [dt_fim] [date] NOT NULL, CONSTRAINT [PK_AT_ENSINO_PROJ] PRIMARY KEY CLUSTERED (
[cod_at] ASC
) ) ON [PRIMARY]