In fact SQL Server gives us everything we need with a Stored Procedure that is called sp_spaceused. But this SP does not support iterating over the tables in some database, so we needed to leverage another Stored Procedure sp_msForEachTable, but this is undocumented.
Thursday, December 30, 2010
How To Get/Retrieve Size Of Tables In SQL Server Databases
In fact SQL Server gives us everything we need with a Stored Procedure that is called sp_spaceused. But this SP does not support iterating over the tables in some database, so we needed to leverage another Stored Procedure sp_msForEachTable, but this is undocumented.
Friday, December 10, 2010
Update Statement in SQL
This will update column1 and column2 in a table for all rows/records.
Update Table_Name set column1 = value1, column2 = value2
This will update column1 and column2 in a table for the records that are filtered by using the criteria in WHERE clause.
Update Table_Name set column1 = value1, column2 = value2 Where columnX = valueX
Tuesday, December 7, 2010
Insert Into statement in SQL
You may write this statement in two different styles.
INSERT INTO my_table VALUES (value1, value2,...)
This is used when you don't want to specify column names during insert operation. so you have to specify the values for columns in same sequence as they appear in database table.
INSERT INTO my_table(column1,column4) VALUES (value1, value4)
This is used when you exactly want to specify column names for which values will be inserted during insert operation.
Monday, December 6, 2010
Order By Keywork in SQL
AND & OR Operators in SQL
The AND & OR Operators
The AND operator displays a record only when the first condition and the second condition both are trueThe OR operator displays a record only if the first condition or the second condition is true
Where clause in SQL
When you want to select, update or delete records, you may use where clause to filter records on which operation will be performed. It is to filter result set on the basis of some criteria, or you may say that it will fetch only those records that fulfill criteria.
"=" can be replaced with any of the following operators.
= | Equal |
<> or != | Not equal |
> | Greater than |
< | Less than |
>= | Greater than or equal |
<= | Less than or equal |
BETWEEN | Between an inclusive range |
LIKE | Search for a pattern |
IN | If you know the exact value you want to return for at least one of the columns |
Select statement in SQL
Syntax of SQL
Meanings of SQL
Location of Data Files in SQL Server
Friday, December 3, 2010
RFID Working Frequencies
1. LF (Low Frequency)
Radio wave having a long wavelength
Wednesday, December 1, 2010
Mifare Standards
Mifare is a term for NXP semiconductors that are used under the ISO standard 14443 for Type-A 13.56 MHz contactless smart cards or proximity cards.
ISO 14443 also has 4 sub parts that differentiated as per aspect of the some interface
ISO 14443-1:2000 Physical characteristics
ISO 14443-2:2001 Radio frequency power and signal interface
ISO 14443-3:2001 Initialization and anti-collision
ISO 14443-4:2001 Transmission protocol
Following is the list overview of mifare smartcard ICs standards.
MIFARE Ultralight
This can be easily used as disposable public transport tickets. This only has a unique 7 byte serial number with no memory for user data storage.
MIFARE Ultralight C
This is same as mifare ultralight but with the option of open cryptography and anti-cloning functionality.
MIFARE Classic 1K
This is mostly used for access management applications. This has a unique serial number either 4 Byte or 7 Byte along with 1 kbyte EEPROM out of which 768 Bytes are available.
MIFARE Classic 4K
Another version of mifare classic with 4 kbyte EEPROM out of which 3480 Bytes are available.
MIFARE Plus
Another version of mifare classic that comes with more security. This has 2 or 4-KBEEPROM with 2 AES keys (2 x 128 bit sector)
MIFARE DESFire EV1
This is fully compient with 14443 A 1-4. This has fast programming feature with 2 Kbytes, 4 Kbytes and 8 Kbytes EEPROM, and crypto algorithms i.e. DES, 3DES, 3KDES and AES.
Mifare Standards History
1994 > MIFARE Classic 1k
1996 > MIFARE Classic 1k (transport scheme)
1997 > MIFARE PRO (Triple DES)
1999 > MIFARE PROX (PKI coprocessor)
2001 > MIFARE UltraLight
2002 > MIFARE DESFire
2004 > MIFARE DESFire SAM
2006 > MIFARE DESFire EV1
2008 > MIFARE Plus
2008 > MIFARE Ultralight C
2010 > MIFARE SAM AV2