Pages

Showing posts with label tutorials. Show all posts
Showing posts with label tutorials. Show all posts

Differences between SQL Server 2000, 2005 and 2008

Differences between SQL Server 2000, 2005 and 2008

The main differences among SQL Server 2000, 2005 and 2008 are shown in the following table.
S.NO
SQL SERVER 2000
SQL SERVER 2005
SQL SERVER 2008
1Query Analyzer and Enterprise manager are separate.Both are combined as SQL Server management Studio (SSMS).Both are combined as SQL Server management Studio (SSMS).
2No XML datatype is used.XML datatype is introduced.XML datatype is used.
3We can create a maximum of 65,535 databases.We can create 2(pow(20))-1 databases.We can create 2(pow(20))-1 databases.
4NillException HandlingException Handling
5NillVarchar(Max) data typeVarchar (Max) data type
6NillDDL TriggersDDL Triggers
7NillDataBase MirroringDataBase Mirroring
8NillRowNumber function for pagingRowNumber function for paging
9NillTable fragmentationTable fragmentation
10NillNillNill
11NillBulk Copy UpdateBulk Copy
12NillCan't encryptEncrypt the entire database introduced in 2008.
13Can't compress the tables and indexes.Can compress tables and indexes (introduced in 2005 SP2).Compress indexes.
14Datetime datatype is used for both date and time.Datetime is used for both date and time.Date and time are separately used for date and time datatype.
15No table datatype is included.No table datatype is included.Table datatype introduced.
16No SSIS is included.SSIS is started using.SSIS avails in this version.
17CMS is not available.CMS is not available.Central Management Server (CMS) was introduced.
18PBM is not available.PBM is not available.Policy based management (PBM) server was introduced.
19PIVOT and UNPIVOT functions are not used.PIVOT and UNPIVOT functions are used.PIVOT and UNPIVOT functions are used.
Overview and advantages of SQL Server 2008 depending on our need
SQL Server 2008 can be a data storage backend for various varieties of data: XML, time/calendar, file, document, spatial, and so on as well as perform search, query, analysis, sharing, and synchronization across all data types.

Other new data types include specialized date and time types and a Spatial data type for location-dependent data. Better support for unstructured and semi-structured data is provided using the new FILESTREAM data type, that can be used to reference any file stored on the file system. Structured data and metadata about the file is stored in SQL Server database, whereas the unstructured component is stored in the file system. Such files can be accessed both via Win32 file handling APIs as well as via SQL Server using T-SQL.

SQL Server 2008 delivers a rich set of integrated services that enable you to do more with your data, such as query, search, synchronize, report, and analyze. 

SQL Server 2008 provides the highest levels of security, reliability, and scalability for your business-critical applications. 

SQL Server 2008 also natively supports hierarchical data, and includes T-SQL constructs to directly deal with them, without using recursive queries. 

Date Picker Frame in swings java Source Code and tutorial

Date Picker Frame in swings java Source Code and tutorial

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class DatePicker extends JFrame{
        int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
        int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);;
        JLabel l = new JLabel("", JLabel.CENTER);
        String day = "";
        JDialog d;
        JButton[] button = new JButton[49];

        public DatePicker(JPanel parent) {
                d = new JDialog();
                d.setModal(true);
                String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" };
                JPanel p1 = new JPanel(new GridLayout(7, 7));
                p1.setPreferredSize(new Dimension(430, 120));

                for (int x = 0; x < button.length; x++) {
                        final int selection = x;
                        button[x] = new JButton();
                        button[x].setFocusPainted(false);
                        button[x].setBackground(Color.white);
                        if (x > 6)
                                button[x].addActionListener(new ActionListener() {
                                        public void actionPerformed(ActionEvent ae) {
                                                day = button[selection].getActionCommand();
                                                d.dispose();
                                        }
                                });
                        if (x < 7) {
                                button[x].setText(header[x]);
                                button[x].setForeground(Color.red);
                        }
                        p1.add(button[x]);
                }
                JPanel p2 = new JPanel(new GridLayout(1, 3));
                JButton previous = new JButton("<< Previous");
                previous.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                month--;
                                displayDate();
                        }
                });
                p2.add(previous);
                p2.add(l);
                JButton next = new JButton("Next >>");
                next.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                month++;
                                displayDate();
                        }
                });
                p2.add(next);
                d.add(p1, BorderLayout.CENTER);
                d.add(p2, BorderLayout.SOUTH);
                d.pack();
                d.setLocationRelativeTo(parent);
                displayDate();
                d.setVisible(true);
        }

        public void displayDate() {
                for (int x = 7; x < button.length; x++)
                        button[x].setText("");
                java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
                                "MMMM yyyy");
                java.util.Calendar cal = java.util.Calendar.getInstance();
                cal.set(year, month, 1);
                int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
                int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
                for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++)
                        button[x].setText("" + day);
                l.setText(sdf.format(cal.getTime()));
                d.setTitle("Date Picker");
        }

        public String setPickedDate() {
                if (day.equals(""))
                        return day;
                java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(
                                "dd-MM-yyyy");
                java.util.Calendar cal = java.util.Calendar.getInstance();
                cal.set(year, month, Integer.parseInt(day));
                return sdf.format(cal.getTime());
        }
}

 class Picker {
        public static void main(String[] args) {
                JLabel label = new JLabel("Selected Date:");
                final JTextField text = new JTextField(20);
                JButton b = new JButton("popup");
                JPanel p = new JPanel();
                p.add(label);
                p.add(text);
                p.add(b);
                final JFrame f = new JFrame();
                f.getContentPane().add(p);
                f.pack();
                f.setVisible(true);
                b.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                                text.setText(new DatePicker(f).setPickedDate());
                        }
                });
        }
}

How to Hide Pages You Like on Facebook new way

How to Hide Pages You Like on Facebook
Broadcasting to your friends the pages you like even the nasty and the not-so-you pages is not worth bragging. You kind a think what will your friends say when you like a page for teddy bears when they’re expecting you to be the rock icon. Well, no worries. Facebook allows its users to hide pages they like. Check out the steps below.
 
Step1.   Log in to your Facebook and go to your Timeline. Click on the “Likes” box.
 




Step2On the upper right corner, click on “Edit”