Path Finding Algorithm In SQL

Dec 22, 2007

I am on this project that will search an optimal route for user from starting point to his/her destination on a map in my SQL Server 2005. I hv create two versions to test out the performance of the path finding algorithm. I have a few classes, which are:



PriorityQueue class which is implemented as List() object and plus codes to sort them in order
PathNode class which are instances for the nodes of the search tree with information on heuristics value
DataSource class which stores data retrieved from the SQL Server 2005 into the RAM for faster execution of the path finding
PathFinding class which implements the path searching algorithm (based on A* algorithm), with PriorityQueue as the openlist, List() object as the closedlist, PathNode as the nodes in both the list to store information and lastly retrieve data from DataSource object that loads the whole table from SQL Server 2005In the first version, i simply use SELECT query to retrieve every correspondent nodes data from the SQL Server 2005 which makes the performance very low which i hv used SQL Server Profiler to check. Next, i use the current version to load all the data into my RAM to increase the execution, which has successfulyl achieved <1sec as opppsed to the 1st version ~8secs.

Now, my problem is to port the algorithm part to my SQL Server 2005 as SQL CLR integration to achieved better results withour the need to burden on client PC. My question is how am i going to do this? I tried before, and several erros like i need to serialize my current PathNode class and i did it. Do i need to make all class into UDT compatible? or??

Thank you very much.

View 6 Replies


ADVERTISEMENT

Dijkstra's Shortest Path Algorithm

Jan 8, 2007

Here it is, the long lasted algorithm I promised.., -- delete previous map
exec dbo.uspdijkstrainitializemap

-- create a new map
exec dbo.uspdijkstraaddpath 'a', 'b', 4
exec dbo.uspdijkstraaddpath 'a', 'd', 1
exec dbo.uspdijkstraaddpath 'b', 'a', 74
exec dbo.uspdijkstraaddpath 'b', 'c', 2
exec dbo.uspdijkstraaddpath 'b', 'e', 12
exec dbo.uspdijkstraaddpath 'c', 'b', 12
exec dbo.uspdijkstraaddpath 'c', 'f', 74
exec dbo.uspdijkstraaddpath 'c', 'j', 12
exec dbo.uspdijkstraaddpath 'd', 'e', 32
exec dbo.uspdijkstraaddpath 'd', 'g', 22
exec dbo.uspdijkstraaddpath 'e', 'd', 66
exec dbo.uspdijkstraaddpath 'e', 'f', 76
exec dbo.uspdijkstraaddpath 'e', 'h', 33
exec dbo.uspdijkstraaddpath 'f', 'i', 11
exec dbo.uspdijkstraaddpath 'f', 'j', 21
exec dbo.uspdijkstraaddpath 'g', 'd', 12
exec dbo.uspdijkstraaddpath 'g', 'h', 10
exec dbo.uspdijkstraaddpath 'h', 'g', 2
exec dbo.uspdijkstraaddpath 'h', 'i', 72
exec dbo.uspdijkstraaddpath 'i', 'f', 31
exec dbo.uspdijkstraaddpath 'i', 'j', 7
exec dbo.uspdijkstraaddpath 'i', 'h', 18
exec dbo.uspdijkstraaddpath 'j', 'f', 8

-- resolve route
exec dbo.uspdijkstraresolve 'a', 'i'This is the outputFromToCost
----------
ab 4
bc 6
cj18
jf26
fi37

Peter Larsson
Helsingborg, Sweden

View 20 Replies View Related

Project Real SQL Agent Is Ignoring @[User::RootDir] + \ And Finding An Old Package Path Somewhere In Bids SLN Metadata

May 12, 2008

Executed as user: xxxxxx-sql. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 4:14:05 p.m. Error: 2008-05-12 16:14:07.84 Code: 0xC00220DE Source: EPT Dimensions - x Description: Error 0x80070003 while loading package file "E:ETLLoadGroup_Dimensions_Daily.dtsx". The system cannot find the path specified. . End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:14:05 p.m. Finished: 4:14:07 p.m. Elapsed: 2.25 seconds. The package execution failed. The step failed.

Hi Im using project real framework and have BIDS installed on same server as SQL Server 2005, when I run from BIDs all
good when I run from SQL Server agent via File system --the first package that master package calls fails
I have double checked the environment variables in Project Real and all good because otherwise BIDs would have failed
and of course in each package the expression data uses @[User::RootDir] to point to the package file path
@[User::RootDir] + \LoadGroup_Dimensions_Daily.dtsx

the issue is the package under SQL Agent is ignoring @[User::RootDir] + \ and finding an old package path somewhere in Bids SLN metadata

Any clues how can refresh the metadata of the package for deployment

thanks in advance
Dave

View 3 Replies View Related

Subject: BCM Install Error - Logfile &&amp; SQL Path Path &&amp; MSSQL.1?

Apr 16, 2008

When trying to install Business Contact Manager (BCM) for Outlook 2007, the setup failed and I was refered to a log file in my Local Settings/Temp folder. The log actually says that Business Contact Manager was installed sucessfully! BCM is supposed to install SQL Express 2005 as an instance or as instance if SQL Express is already installed. There is an MSSMLBIZ instance in Services..

Who can I send the Log File to for analysis and the fix feedback?

When I first went into Computer Management and clicked on Services and Applications in the left panel, the error message appeared "Snap-in failed to intialize. Name: SQL Server Configuration Manager CLSID:{CA9F8727-31DF-41D2-975C-887D84903967} This message diappeared when I clicked on Services and Applications again. Under Services, there are 3 SQL services - one is an application that was uninstalled 3-4 weeks ago and I disabled this service. The other 2 are: SQL Server (MSSMLBIZ) and the other one is SQL Server (SQLEXPRESS) When I tried to start either of the last 2, the message appeared: Services "Could not start the SQL Server (MSSMLBIZ) service on Local Computer. Error 3: The system cannot find the path specified. Under Program Files/Microsoft SQL Server/MSSGL.1 folder is mostly empty. So, it seems like the Path in the Registry is not valid and that nothing is being installed in the MSSQL.1 folder. If so, how do I fix this?

How do I get the BCM SQL instance to install and run properly? what do the messages in Services mean and how do I resolve these.

Thank you!

Gary

View 3 Replies View Related

SQL Server Not Starting - Tempdb Path Updated To Wrong Path

Oct 4, 2007

After updating TempDB path to a wrong path (without file name only folder name) the service is not starting. How can i sovle this and start the service

thanks

Leena

View 13 Replies View Related

Algorithm

May 22, 2002

Does any have a algorithm that can divide A into B without using the divide
sign (/) or the multiplication sign ( * ).

View 1 Replies View Related

What Is The Best Algorithm To Use?

Nov 24, 2006

I am new to DM and I am not sure which algorithm would be best to use.

I am trying to build a custom comparitor application that companies can use to compare themselves against other companies based on certain pieces of information. I need to group a company with 11 other companies based on 6 attributes. I need the ability to apply weightings to each of the 6 attributes and have those taken into consideration when determining which 10 other companies each company is grouped with. Each group must contain 11 members, the company for the user logged in and 10 other companies that it will be compared against.

At first I thought that clustering would be a good fit for this but I can not see a way to mandate that each cluster contain exactly 11 members, I cannot see a way to weight the inputs, and I think each company can only be in one cluster at a time which do not meet my requirements.

Any help will be greatly appreciated!

View 3 Replies View Related

Algorithm

Jun 8, 2006

Well, i have read in claude seidman book about data mining that some algorithm inside in microsoft decision tree are CART, CHAID and C45 algorithm. could anyone explain to me about the tree algorithm and please explain to me how the tree algorithm used together in one case?

thank you so much

View 1 Replies View Related

Luhn Algorithm

Dec 11, 2006

Use this to check if Luhn has valid check digitCREATE FUNCTIONdbo.fnIsLuhnValid
(
@Luhn VARCHAR(8000)
)
RETURNS BIT
AS

BEGIN
IF @Luhn LIKE '%[^0-9]%'
RETURN 0

DECLARE@Index SMALLINT,
@Multiplier TINYINT,
@Sum INT,
@Plus TINYINT

SELECT@Index = LEN(@Luhn),
@Multiplier = 1,
@Sum = 0

WHILE @Index >= 1
SELECT@Plus = @Multiplier * CAST(SUBSTRING(@Luhn, @Index, 1) AS TINYINT),
@Multiplier = 3 - @Multiplier,
@Sum = @Sum + @Plus / 10 + @Plus % 10,
@Index = @Index - 1

RETURN CASE WHEN @Sum % 10 = 0 THEN 1 ELSE 0 END
END
Peter Larsson
Helsingborg, Sweden

View 20 Replies View Related

BINARY_CHECKSUM Algorithm

Jul 23, 2005

Hello,Do you know if the algorithm for the BINARY_CHECKSUM function in documentedsomewhere?I would like to use it to avoid returning some string fields from theserver.By returning only the checksum I could lookup the string in a hashtable andI think this could make the code more efficient on slow connections.Thanks in advanced and kind regards,Orly Junior

View 3 Replies View Related

Algorithm Of The MAX Command In T-SQL

Dec 7, 2007

What kind of algorithm does the MAX command uses? I have a table that I need to get the last value of the Transaction ID and increment it by 1, so I can use it as the next TransID everytime I insert a new record into the table. I use the MAX command to obtain the last TransID in the table in this process. However, someone suggested that there is a problem with this, since if there are multiple users trying to insert a record into the same table, and processing is slow, they might essentially come up with the same next TransID. He came up with the idea of having a separate table that contains only the TransID and using this table to determine the next TransID. Will this really make a difference as far as processing speed is concerned or using a MAX command on the same table to come up with the next TransID enough? Do you have a better suggestion?

Thanks

View 3 Replies View Related

Neural Net Algorithm

Sep 15, 2006

Hi,

Would anyone be able to provide a reference paper on the neural net algorithm implemented in SQL Server 2005 to better understand how it works?

Thanxs for any info.

View 3 Replies View Related

Clustering Algorithm

Oct 29, 2007


Hi All!

I have few questions regarding Clustering algorithm.

If I process the clustering model with Ks (K is number of clusters) from 2 to n how to find a measure of variation and loss of information in each model (any kind of measure)? (Purpose would be decision which K to take.)

Which clustering method is better to use when segmenting data K-means or EM?

Thanks in advance!

View 4 Replies View Related

C# Algorithm/ Libraries

Jan 10, 2006

Hi.

Does anyone know of or where I can find implementation of these C#  algorithm /class libraries:

a) RLS - Recursive Least Square algorithm?

b) MWAR - Multi-resolution Wavelet Auto-regresive algorithm?

c) AR - Autoregresive moving awerage algorithm?

d) EWMA - Exponentially Weighted Moving Average

The .NET framework System.Math class do not seem to have these libraries. 

Regards

   Shorin

View 2 Replies View Related

Which Algorithm Is Best For Perdiction

Jul 12, 2006


Hi

I want to predict which product can be sold together , Pl help me out which algorithm is best either association, cluster or decision and pl let me know how to use case table and nested table my table structure is

Cust_ID
Age
Product
Location
Income

Thanks
Rajesh Ladda

View 1 Replies View Related

Problem With AES_256 Algorithm

Feb 14, 2008

 
hi,
i am using sqlserver2005 as back end for my project.
actually we developing an stand alone web application for client, so we need to host this application in his server. he is not willing to install sql server 2005 edition in his sever so we r going by placing .mdf file in data directory of project.

but before i developed in server2005 i used aes_256 algorithm to encrypt n decrypt the pwd column by using symmetric keys.it is working fine.

but when i took the .mdf file of project n add into my project it is throwing error at creation of symmetric key that
"Either no algorithm has been specified or the bitlength and the algorithm specified for the key are not available in this installation of Windows."

please suggest me a solution

View 1 Replies View Related

Developing A New Plug-in Algorithm

Feb 7, 2008

Hi,

i'm making my master thesis about a new plug-in algorithm, with the LVQ Algorithm.
I make the tutorial with the pair_wise_linear_regression algorithm and i have some doubts. i was searching for the code of the algorithm in the files of the tutorial and i didn't saw it. I have my new algorithm programmed in C++ ready to attach him, but i don't know where to put him, in which file i have to put him to start to define the COM interfaces? And in which file is the code of the pair_wise_linear_regression algorithm in the SRC paste of the tutorial?

Thanks

View 3 Replies View Related

Algorithm : Data Mining

Feb 26, 2007

Hello friends,

Can u give some idea about the Algorithm in Data Mining for Clustering..

Please reply...

 

View 1 Replies View Related

Time Series Algorithm

Aug 17, 2006

I am trying to predict Revenue gererated by each Person.
My Input like this:

Month Person Revenue

-----------------------------------------
20050101 Person1 $1000
20050101 Person1 $2000
20050201 Person1 $1000
20050101 Person2 $5000
20050201 Person2 $2000
20050201 Person2 $3000

Obviosly for Person1 and 200501 I expect to see on MS Time Series Viewer $3000, correct?
Instead I see REVENUE(actual) - 200501 VALUE =XXX,
Where XXX is absolutly different number.

Also there are negative numbers in forecast area which is not correct form business point
Person1 who is tough guy tryed to shoot me.
What I am doing wrong. Could you please give me an idea how to extract correct
historical and predict information?

Thnak you,
Tim.

View 5 Replies View Related

Which Algorithm To Be Used With Symmetric Keys

Mar 28, 2006



Hi,

I want to create a symmetric key that will be encrypted by certificate key. Can u guide me which algorithm is best out of the following:

DES, TRIPLE_DES, RC2, RC4, RC4_128, DESX, AES_128, AES_192, AES_256.

I tried using AES_128, AES_192, AES_256 but it says 'the algorithm specified for the key are not available in this installation of Windows.'

Pls tell me which else algorithm is best to use and pls specify why.

Thanks

Gaurav

View 5 Replies View Related

Which Algorithm Is Better For Customer Retention

Jul 25, 2006

Hi

Pl any one tell me which algorithm is better for Customer retention Using SQL server 2005 analysis services

It will be great if some one can give the same with example of data model with key column , and rest

Thanks in Advance

Rajesh Ladda

View 3 Replies View Related

Questions About Microsoft_Linear_Regression Algorithm

Jul 2, 2007

Currently I want to run a vanilla multivariate regression and get some statistics back about the regression that is built. For instance, besides the coefficients, I also want the two-sided p-values on the coefficients and the R2 of the model.



I've tried playing with the Microsoft_Linear_Regression algorithm and have run into two issues. I'm doing all this programmatically using DMX queries rather than through the BI studio.



(a) I can never get the coefficients from the regression to match with results I would get from running R or Excel. The results are close but still significantly off. I suspect this is because the Linear Regression is just a subset of the Decision/Regression Trees functionality, in which case some kind of Bayesian prior is being incorporated here. Is that the issue? And if so, is there some way to turn off the Bayesian scoring and get a vanilla multivariate regression? I don't see anything in the inputs to the linear regression that would let me do this, and even running Microsoft_Decision_Trees with a few different settings, I can't get the output I'm looking for. If there's no way to turn off the Bayesian scoring, can someone explain to me what the prior being used here is and how Bayesian learning is being applied to the regression?



(b) Using the Generic Tree Viewer, I see that there are a few "statistics" values in the Node_Distribution, but I'm not sure what they're referring to. One of them looks like it might be the MSE. I could play with this some more to find out, but I'm hoping someone here can save me that work and tell me what these numbers are. Hopefully they will constitute enough information for me to rebuild the p-values and the R2.



Thanks!

Wilfred

View 3 Replies View Related

How To To Develope A New PlugIN Algorithm

Oct 18, 2006

I have a code for Nearest neighbour algorithm, I want to build a datamining algorithm using that code..

I have the following link that includes the source code for a sample plug-in algorithm written in C#.

(managed plug-in framework that's available for download here: )http://www.microsoft.com/downloads/details.aspx?familyid=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&displaylang=en#DMAPI.

But i am confused on where to insert my algorithm logic?

View 3 Replies View Related

Association Algorithm Itemsets

Jan 20, 2007

What is the algorithm that generates the itemsets in the Association model? I'm looking to possibly use this part of the Association algorithm (i.e. the grouping into itemsets) in a separate plug-in algorithm.

View 1 Replies View Related

Time Series Algorithm

Jan 18, 2007

Hi Jamie:

I am building data mining models to predict the amount of data storage in GB we will need in the future based on what we have used in the past. I have a table for each device with the amount of storage on that device for each day going back one year. I am using the Time Series algorithm to build these mining models. In many cases, where the storage size does not change abruptly, the model is able to predict several periods forward. However, when there are abrupt changes in storage size (due to factors such as truncating transaction logs on the database ), the mining model will not predict more than two periods. Is there something I can change in terms of the parameters the Time Series Algorithm uses so that it can predict farther forward in time or is this the wrong Algorithm to deal with data patterns that have a saw tooth pattern with a negative linear component.



Thanks,

View 1 Replies View Related

Help With Setting Algorithm Paramteres

May 28, 2006

I was walking through the Text Mining example - which at one step required me to set Algorithm Parameters - MAXIMUM_OUTPUT_ATTRIBUTES=0. When I tried that the project would not build giving an error -
Error (Data mining): The 'MAXIMUM_INPUT_ATTRIBUTES' data mining parameter is not valid for the 'XYZ' model.

I was getting the same error when I tried to set it for Microsoft_neural_netowrk - Hidden_Node_ratio. When I do a properties from "set Algorithm Properties" from Mining Model, I do not see these properties set as default.

I have installed SQLServer 2005 Standard Edition Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00

Any help would be much appreciated.

Thanks
Rajeev Gupta

View 4 Replies View Related

Problem With Picking The Right Algorithm

Feb 8, 2007

Hi

I'm using SQL Server 2005. The problem I have is as follows. I have several production lines and as with everything parts in the line tend to break. I have data from all the breaks that occurred in the last 2 years. What I want to do is predict the next break and the production line it's going to happen on. I would also like to go to a future date and check what possible breaks might occur on that date. I've run quite a few models but none of them helps me with future events. I think I might be using the wrong algorithm or I€™m just not doing it right. If somebody can please suggest an algorithm and maybe help me with a web site that has a tutorial similar to my problem

Thanks
Elmo

View 7 Replies View Related

Process Association Algorithm Using ISS

Feb 20, 2008



Hi!

I need to deploy several Association algorithms, so I want to do it using ISS. Can anyone help me telling me which task should I have to use to do it?

Thanks!

Ezequiel

View 1 Replies View Related

Any Other Plugin Algorithm Developed??

Sep 19, 2006

hi,

as we know we get clustering algorithm with managed plugin algorithm API

does anyone have developed any other plugin algorithm as i want to check what are the things that needs to be modified. i am not data mining algorithm developer but i just want to check where we have to make changes. i would be better if i get source code for algorithm other than clustering

ANOTHER PLUGIN ALGORITHM REQURIED??



thanks in advanced

View 4 Replies View Related

Association Rules Algorithm, Help?

Nov 22, 2007

I need to create a set of cases for a project that uses the Microsoft Association Rules algorithm to make recommendations for products to customers. My question is: the set of scenarios must include all transactions of customers for training?. or is it sufficient some percentage of total transactions? If i do not use all transactions of customers, could be that the algorithm does not consider some products in their groups or rules and could not make recommendations about these?

thanx
Diego B.

View 3 Replies View Related

Derived Attributes -how Much Should I Help The Algorithm

Feb 28, 2008

Hi,
I am a novice data miner, working primarly in the BI field. I want to learn more about Data Mining so I am doing some experimenting.

I have a question regarding input attributes. I am particurlary wondering about the Neural Network algorithm, but also for Data Mining in general. What I am thinking about is if, and if so to what extend, I should create derived attributes for the algoritms. I´ll try to clarify with an example:

Lets say I am analysing sales performance for departments in a large company. Some of those departments has a high staff turnover, which might affect sales negatively (although I don't know that...). The high staff turnover could be detected, by the algorithm and humans, by looking at each sales, and which salesperson that handled it. If there are a lot more different salespersons in different departments by the same size and during the same time period, this is a sign of a high staff turnover.

Now is this info enough for the algorithm? Or should I add a column in the case dataset, where I discretesize the staff turnover as "High,Medium,Low"? Does this help the algorithm or can it affect the performance?

I hope you'll get the idea of my question, otherwise ask me!

Cheers,
AL

View 1 Replies View Related

SQL Server 7.0 &#39;File Growth&#39; Algorithm

Nov 16, 2000

We are running SQL Server 7.0 SP2, and are experiencing the following out-of-
space error message:

"Could not allocate new page for database 'FooBar'.
There are no more pages available in filegroup SECONDARY.
Space can be created by dropping objects, adding additional files,
or allowing file growth."

Needless to say, but the the database is set for 10% unlimited autogrowth and there
IS available space in the partition where the filegroup resides.

Any ideas as to why this is happening? What is SQL Server's algorithm for allocating
space when growing a database? Must it satisfy the request in one 'extent' and the
cause of our problem is that our disk is fragmented?

Thanks in advance.

Bill Zimmer - zim@ibx.com

View 1 Replies View Related

CREATE INDEX ..using B-tree Algorithm

Apr 30, 2007

Is it possible to specify an algorithm like B-TREE in create index syntax of MSSQL Server.

In MySQL i have the option to specify this in create table syntax .

Its very urgent.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved