Find Jobs
Hire Freelancers

Trigger/constraints/ stored procedure for a tree

$30-100 USD

Complété
Publié il y a plus de 21 ans

$30-100 USD

Payé lors de la livraison
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
N° de projet : 2897414

Concernant le projet

10 propositions
Projet à distance
Actif à il y a 21 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
Décerné à :
Avatar de l'utilisateur
See private message.
$25,50 USD en 14 jours
5,0 (39 commentaires)
4,4
4,4
10 freelances proposent en moyenne $138 USD pour ce travail
Avatar de l'utilisateur
See private message.
$34 USD en 14 jours
5,0 (6 commentaires)
4,7
4,7
Avatar de l'utilisateur
See private message.
$63,75 USD en 14 jours
5,0 (13 commentaires)
3,3
3,3
Avatar de l'utilisateur
See private message.
$85 USD en 14 jours
5,0 (7 commentaires)
2,5
2,5
Avatar de l'utilisateur
See private message.
$17 USD en 14 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
See private message.
$85 USD en 14 jours
0,0 (1 commentaire)
0,0
0,0
Avatar de l'utilisateur
See private message.
$42,50 USD en 14 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
See private message.
$46,75 USD en 14 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
See private message.
$850 USD en 14 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
See private message.
$127,50 USD en 14 jours
0,0 (0 commentaires)
0,0
0,0

À propos du client

Drapeau de LUXEMBOURG
Oberanven, Luxembourg
5,0
70
Membre depuis sept. 11, 2004

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.