to get table names which are referenced by given table

Use this function to get table name which are referenced as foreign key by  given table's primary key

I want to find out that table names in database, a primary key of a table that referenced foreign key of another tables.

Here i have to pass the main table name and find out the tables the primary key of main table referenced the foreign key of another tables.


CREATE FUNCTION [dbo].[getForignkeyTblName1](@tblname varchar(50))
RETURNS @tbl TABLE(tblnames varchar(50))
AS
BEGIN
declare @objid int,@objname nvarchar(776),@result varchar(50)
INSERT INTO @tbl SELECT b.Name FROM sys.foreign_keys a
INNER JOIN sys.tables b
ON a.parent_object_id =b.object_id
 WHERE a.referenced_object_id =(SELECT object_id FROM  sys.tables WHERE name=@tblname)
return
END

--SELECT * FROM [getForignkeyTblName1]('MainTable')

What is Normalization?

Normalization is the process of designing a data model to efficiently store data in a database
  • Database normalization is a data design and organization process applied to data structures based on rules that help building relational databases.
  • In relational database design, the process of organizing data to minimize redundancy is called normalization.
  • Normalization usually involves dividing a database into two or more tables and defining relationships between the tables.
  • The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

What are the Different Normalization Forms?

1NF - Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.

2NF -If an attribute depends on only part of a multi-valued key, then remove it to a separate table.

3NF -If attributes do not contribute to a description of the key, then remove them to a separate table. All attributes must be directly dependent on the primary key.

Rules for 3NF
  • To separate table for each set of related attributes, and give a primary key for each table.
  • If an attribute depends on only part of a multi-valued key, remove it to a separate table
  • If attributes do not contribute to a description of the key, remove them to a separate table.

Define Web Confiq

Web Config

     Web.config is the main settings and configuration file for an ASP.NET web application.
     The file is an XML document that defines configuration information regarding the web application.
     This file stores the information about how the web application will act.
     The web.config file contains information that control module loading, security configuration, session state configuration, application language compilation settings and connection String.

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified

There are few things have to notice for above error, and do and check one by one.

1. Check that you are using correct version of ASP.Net in IIS( Check applicationpool ),if not select exact one. 
2. If your ASP.NET  Version is 3.5, Ajax dll inbuilted in Framework 3.5. So change your extension version to 3.5 in web confiq.
3. If your asp.net version is 2.0 you have to install ASPNET.2.0.AJAX.Extensions on your server.

Here i have given the link to download ASPNET.2.0.AJAX.Extensions.

4. Redirect old version to new version like below.
 
<runtime>
 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
   <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
   <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
  </dependentAssembly>
  <dependentAssembly>
   <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
   <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
  </dependentAssembly>
 </assemblyBinding>
</runtime>

5. Change public key version to 31BF3856AD364E35(its work, how ? me too)

I hope this will help you.

Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Foxs, I have faced a trouble while migrate the site from one server to another. I have faced this problem. This problem is not migrate problem.

I received an error "Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

This error belongs to higher version of  MySql.Data.dll. I dont have same version dll, So that am used higher version and use binding redirect option in web confiq file to resolve this problem.

Just i redirect old version to new version as like below.(under configuration)

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d"/>
        <bindingRedirect oldVersion="1.0.7.30072" newVersion="5.0.8.1"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

This resolved my problem.

Change TFS to Visual Source Safe in Source Control VS 2010


We have been given steps for change the option from Team Foundation Server to Visual Source Safe. please follow the same.

1.Tools --> select Options.
2.Option dialog box will appear once you select Options
3.Choose Source Control in the dialog box
4.Now you can select the option either Visual Source Safe or Team Foundation Server according to our necessary in Current Source control Plug-in

Now you can change Team Foundation server to Visual Source Safe.

I hope it will help you.

Google Algorithm Change – SERP Ranking Algorithm 2012 – Google Penguin Update

Google repeatedly turned down with many algorithm update and change right from past years. Google revealed algorithm in the versions Google panda 1.1, Google panda 2.2, Google panda 3.3 and Google penguin update as now recently. Moreover google penguin has been updated in a span of 10 days from its launched date [April 17 & April 27]. Not like previous panda update the new google penguin update has many features and barriers too for SEO. It drops many protocols for a websites’ SERP and the keyword ranking position.
1. Penguin update mainly focuses on backlinks of a website or webpage.
2.A website having links from unwanted category or unrelated websites, the SERP ranking of the website/webpage is automatically pushed down.
3. Also links from link farms and bulk directory submission is strictly restricted.
4. If more than 50 percent of the backlinks are from irrelevant websites, google marks it as webspam
5. When a website/web page gets more backlinks from unwanted categories remove those irrelevant links and increase links from
6. Google mentions the opposite of “white Hat SEO” as “black hat webspam”. Which means to get high relevant traffic spam items like unwanted links, irrelevant sites and links farms must be avoided.
7. While in a few days Google is ready to launch another algorithm to target and avoid webspam.
8.  Keyword stuffing and footer link keywords are another prey for google Penguin update.
9. Recent google algorithm change also tells about content duplication and content copywriting. When a website or webpage is having a duplicated content with the keywords stuffed or used, automatically the SERP and ranking positions of the keywords drowns away drastically.
10. The site owner may be in confused state for what reason changes have been done even though there is no unwanted backlinks, but still a drop in keyword positions and SERP.
The ultimate moral tip of google algorithm change and google penguin update 2012 is don’t make your content a duplicated one and with unwanted backlinks.