Arquitetura e projeto de banco de dados-der
Disciplina: APBD- Arquitetura e Projeto de Banco de Dados
Nomes: Diego Andrade Clarice Murta
a)
b)
c)
// Script de criação da tabela Empresa
USE [Teste]
GO
/****** Object: Table [dbo].[Empresa] Script Date: 05/16/2011 16:13:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
* CREATE TABLE [dbo].[Empresa]( * [CNPJ] [bigint] NOT NULL, * [Nome] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL, * [Endereço] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL, * CONSTRAINT [PK_Empresa] PRIMARY KEY CLUSTERED * ( * [CNPJ] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
//Script de criação da tabela Empregado
USE [Teste]
GO
/****** Object: Table [dbo].[Empregado] Script Date: 05/19/2011 09:01:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Empregado]( [CPF] [int] NOT NULL, [Nome] [char](30) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL, [CTPS] [int] NOT NULL, [CNPJ] [bigint] NOT NULL, CONSTRAINT [PK_Empregado] PRIMARY KEY CLUSTERED
(
[CPF] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
//Script de criação da tabela Onibus
USE [Teste]
GO
/****** Object: Table [dbo].[Onibus] Script Date: 05/19/2011 09:00:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Onibus]( [Chassi] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL, [Ano Fabricacao] [int] NOT NULL, [Nº Passageiros] [int] NOT NULL, [Placa] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL, [CNPJ] [bigint] NOT NULL, CONSTRAINT [PK_Onibus_1] PRIMARY KEY CLUSTERED
(
[Chassi] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO