Find Jobs
Hire Freelancers

Trigger/constraints/ stored procedure for a tree

$30-100 USD

Concluído
Publicado há mais de 21 anos

$30-100 USD

Pago na entrega
We have 2 tables : S S_S S contains sites (a geographical location, a building, a city, a company...) Sites are linked together in a table S_S A record in S_S indicates ASId is linked to BSid Links should be entered only once We need two TRANSAC Sql procedures : a) For a given site in the network, and a given distance d, we want to have the list of the sites 'connected' to the site SId and with maximum distance d from SId. This list must be in a recordset format (select Sid from xxx) and not in a string format (SId1, Sid2...). The distance is the number of levelsthat separate two elements in the tree b) A set of constraints/ triggers in the table S_S to prevent entering multiple entries and 'tree illegal entries' Illegal tree entries are those groups of entries that will result in a loop. For example A linked to B B linked to C C may not be linked to A as it is already linked via B Suggested solution : have all the records S_S in the form of a regular tree There will be necessarily a top parent, whoc can have one or several children etc...I assume this is the only simple solution The tables are scripted below There is a record zero in S (Sid = 0, Sname = 'NA' ) that allows to have the constraint Not null on ASid and BSid. This record is simply ignored in the result. The constraint 'Not null' in fields must be kept. CREATE TABLE [dbo].[S] ( [SId] [int] IDENTITY (1, 1) NOT NULL , [SName] [nvarchar] (100) COLLATE French_CI_AS NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[S_S] ( [SSId] [int] IDENTITY (1, 1) NOT NULL , [ASId] [int] NOT NULL , [BSId] [int] NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[S] WITH NOCHECK ADD CONSTRAINT [PK_S] PRIMARY KEY CLUSTERED ( [SId] ) ON [PRIMARY] GO ALTER TABLE [dbo].[S_S] WITH NOCHECK ADD CONSTRAINT [PK_S_S] PRIMARY KEY CLUSTERED ( [SSId] ) ON [PRIMARY] GO ALTER TABLE [dbo].[S_S] ADD CONSTRAINT [FK_S_S_S] FOREIGN KEY ( [ASId] ) REFERENCES [dbo].[S] ( [SId] ), CONSTRAINT [FK_S_S_S1] FOREIGN KEY ( [BSId] ) REFERENCES [dbo].[S] ( [SId] ) GO ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. ## Platform sql server 2000
ID do Projeto: 2897414

Sobre o projeto

10 propostas
Projeto remoto
Ativo há 21 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$25,50 USD em 14 dias
5,0 (39 avaliações)
4,4
4,4
10 freelancers estão ofertando em média $138 USD for esse trabalho
Avatar do Usuário
See private message.
$34 USD em 14 dias
5,0 (6 avaliações)
4,7
4,7
Avatar do Usuário
See private message.
$63,75 USD em 14 dias
5,0 (13 avaliações)
3,3
3,3
Avatar do Usuário
See private message.
$85 USD em 14 dias
5,0 (7 avaliações)
2,5
2,5
Avatar do Usuário
See private message.
$17 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$85 USD em 14 dias
0,0 (1 avaliação)
0,0
0,0
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$46,75 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$850 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$127,50 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) LUXEMBOURG
Oberanven, Luxembourg
5,0
70
Membro desde set. 11, 2004

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.