|
Hi everyone,
I am a beginner to mysql and msmq. How to make the automatic data transaction from msmq to mysql.
I develop the application using asp.net with c#. In the application,the user entered data is saved into the Msmq. These msmq data need to be transferred to mysql database for the particular time period. Please help me regarding this. My application is too slow when I execute it due to bulk of data in the database.
Please help me regard this.
Is there any other way to improve the speed of the application running with mysql database, please guide me.
Thanks in Advance,
J. Mohan.
I see the God face in the helping people
|
|
|
|
|
Hi,I want to create OLAP cube for my database for generating reports.My database is not in star schema.I have tried without star schema but its not giving appropriate results sometimes.I have seen exmples with adventure works database which looks like a star schema database.Is it necessary for database to be in Star Schema before creating cube ?
Please tell me any link to start with OLAP cube.
|
|
|
|
|
Can u explain the meaning of these normal forms
Third Normal Form (3NF)
Remove columns that are not dependent upon the primary key.
Fourth Normal Form (4NF)
A relation is in 4NF if it has no multi-valued dependencies.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Why, can't you do your own homework?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
First CP Normal Form: Google for [^], [^]!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
These links seems to ne inaccessible.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Hence go to Wikipedia (English) home page and type "Third Normal Form" in the search text box.
Then ... (Now I suppose you know what to do with "Fourth Normal Form").
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: (Now I suppose you know what to do with "Fourth Normal Form").
The last time I heard someone tell another what to do with their 4th Normal form was shortly before the bar brawl broke out.
“If we are all in agreement on the decision - then I propose we postpone further discussion of this matter until our next meeting to give ourselves time to develop disagreement and perhaps gain some understanding of what the decision is all about.”-Alfred P. Sloan
|
|
|
|
|
Your comment applies only if my sentence is taken out of its context.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Friends,
I hv got 2 fields in a table. Year and title.
year Title
1945 t1
1945 t2
1945 t3
i want a query to retrieve answer like foll. :
1945 //Field name
t1
t2
t3
1945 should be a field name and under that i need 3 rows where i can display title values..
Thanks in advance
|
|
|
|
|
Why exactly do you need something like this?
It looks weird. You want do mix pieces of different information in the same column.
|
|
|
|
|
Use Union
select distinct Year as [ColumnName] from myTable
union
select Title from myTable
Use group by in first query if required in your circumstance.
|
|
|
|
|
Thanks yaar. It works..
But can we get a output like this :
1945 1950 1960
t1 t4 t6
t2 t5 t7
t3
i hv also added group by. But it doesn't work..
|
|
|
|
|
What you are trying to achieve (I think) is known as pivoting. This sample should point you in the right direction.
create table UserArea(Country varchar(20))
insert into UserArea
select 'India'
union all
select 'USA'
union all
select 'India'
union all
select 'UK'
DECLARE @SQL nvarchar(4000)
SET @SQL=''
SELECT @SQL= @SQL +
'SUM(CASE WHEN Country=''' + a.Country + ''' THEN 1 ELSE 0 END) AS [' + a.Country + '],'
FROM (select distinct Country from UserArea) as a
select @SQL = left(@SQL,len(@SQL)-1)
SET @SQL='SELECT ' + @SQL + ' FROM UserArea'
EXEC(@SQL)
drop table UserArea
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi Niraj Here ,
I hope this will work for you....
try this..
Select fieldnamewhich containst1t2ec as [1945]
From Tablename
Where year = 1945
Have a noce Day..
Stay Tune .....
Take Care....
|
|
|
|
|
Any ideas? I'm coming across this, and it makes no sense to me.
Marc
|
|
|
|
|
i wasnt aware that you could create a PK that wasnt clustered, i thought they were all clustered indexes.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
In SQL Server they are clustered as default. But you can make then non-clustered and use the clustered index for yourself.
modified on Friday, June 20, 2008 12:20 AM
|
|
|
|
|
makes sense...thanks, but i'm going to assume they arent doing that in the table Marc's looking at.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
As I'm sure you know - it depends on your database design and how you access the tables.
I think they are made this way by default to ensure at least some "workable" indexes for default databases from people who haven't looked too much into indexation.
Because if you mainly access a table via - for example - foreign keys and extract 2 or 3 specific rows of data, it makes sense - to me at least - to make that your clustered index.
Also if your PK is primarily an identity or similar number which mattes little then I would also say it makes sense to keep that index non-clustered, because it usually means you'll access data not in the index anyway and the benefits of the clustered index diminishes.
However if your primary key consists of "relevant data" and you need to access this data only - and often - then it is beneficial to have it as clustered.
In my opinion - it is as all things with databases, a case-by-case evaluation, but as mention first - my main guess is that it is made to simply have some "default" clustered indexes for the default databases, and those who know what they are doing will evaluate whether it is a beneficial index and change it if not anyway.
|
|
|
|
|
One instance I have seen is when using a GUID as a PK field.
|
|
|
|
|
select convert(varchar(10),status.Logintime ,101) as Date,empcode,empname,count(*) as [No of Calls]
from status join empmaster on empmaster.empid = status.empcode
where empmaster.Permission <> '1' and logintime between '06/02/2006' and '06/03/2006'
group by empcode,empname, convert(varchar(10),status.Logintime ,101) order by empcode asc
select convert(varchar(10),status.Logintime ,101) as Date,empcode,empname,count(*) as [No of Contacts]
from status join empmaster on empmaster.empid = status.employeecode
where empmaster.Permission <> '1' and logintime between '06/02/2008' and '06/03/2008' and
statuscode not in (11)group by empcode,empname, convert(varchar(10),status.Logintime ,101) order by emp asc
i have these two queries.the problem is how to join these queries?
can any one help me.if i write two queries as one,data of two columns ( [no of calls] and [no of contacts]) resulting same count.
|
|
|
|
|
use UNION
select convert(varchar(10),status.Logintime ,101) as Date,empcode,empname,count(*) as [No of Calls]<br />
from status join empmaster on empmaster.empid = status.empcode<br />
where empmaster.Permission <> '1' and logintime between '06/02/2006' and '06/03/2006' <br />
group by empcode,empname, convert(varchar(10),status.Logintime ,101) order by empcode asc<br />
<br />
UNOIN<br />
<br />
select convert(varchar(10),status.Logintime ,101) as Date,empcode,empname,count(*) as [No of Contacts]<br />
from status join empmaster on empmaster.empid = status.employeecode<br />
where empmaster.Permission <> '1' and logintime between '06/02/2008' and '06/03/2008' and<br />
statuscode not in (11)group by empcode,empname, convert(varchar(10),status.Logintime ,101) order by emp asc
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Use "Union All" instead of "Union" if your 2 queries doesn't return duplicates.
|
|
|
|
|
Yes you are right, I forgot to write UNION ALL in both two places on my first response.Thanks for correcting me dude.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|