Referential integrity is a database concept that ensures that relationships between tables remain consistent. When one table has a foreign key to another table, the concept of referential integrity states that you may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table. It also includes the techniques known as cascading update and cascading delete, which ensure that changes made to the linked table are reflected in the primary table.
Reference: http://databases.about.com/cs/administration/g/refintegrity.htm
This website is dedicated to common, day to day programming and database related Frequently Asked Questions. Popular Programming and Database Articles under one blog
Wednesday, May 6, 2009
Friday, April 17, 2009
Stop Youtube from displaying related videos once playback of the initial video starts
To stop displaying related videos we can add a parameter (rel=0 for stop displaying) to the url of the embedded code provided by you tube. See example below
http://www.youtube.com/v/u1zgFlCw8Aw&fs=1&rel=0
For complete list of parameters check the following Google API site:
http://code.google.com/apis/youtube/player_parameters.html
http://www.youtube.com/v/u1zgFlCw8Aw&fs=1&rel=0
For complete list of parameters check the following Google API site:
http://code.google.com/apis/youtube/player_parameters.html
Thursday, April 16, 2009
Finding duplicates with SQL?
Suppose Col1 is the field name for which you want to find duplicates:
Select Col1, Count(Col1) as count
from table1
group by Col1
having Count(Col1) > 1
.
Select Col1, Count(Col1) as count
from table1
group by Col1
having Count(Col1) > 1
.
Formatting DateTime to Date in SQL
Select convert(varchar(10),GetDate(),101)
Output: 04/16/2009
Select convert(varchar(10),GetDate(),103)
Output: 16/04/2009
Output: 04/16/2009
Select convert(varchar(10),GetDate(),103)
Output: 16/04/2009
Rounding a number to 2 decimal places in SQL
Use T-SQL Convert Function.
Select convert ( decimal(8,2) , 9.4125 )
Output: 9.41
Select convert ( decimal(8,2) , 9.4125 )
Output: 9.41
What is Windows Presentation Foundation (WPF)?
Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both standalone and browser-hosted applications. Some examples are Yahoo! Messenger and the New York Times Reader.
The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware. WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography. WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.
Reference: http://msdn.microsoft.com/en-us/library/aa970268.aspx
The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware. WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography. WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.
Reference: http://msdn.microsoft.com/en-us/library/aa970268.aspx
Wednesday, April 15, 2009
Subscribe to:
Posts (Atom)