Friday, September 11, 2009

ORACLE/SQL

ORACLE / SQL

STRUCTURED QUERRY LANGUAGE(SQL)

In Relational database data is represented as tables(relations). The result of a quarrey is also a table. The structure o a table is shown below.


A table has a unique name and consists of many rows and columns. Each row is called Tuple (or record), it contains stored information. A table can have one or more than 1 columns. A column has a column name and data type. The data type of the column describes the attribute of the tuples. The structure of a table is known as relation schema.

In SQL, the ‘relation’ is known as ‘Table’, ‘tuple’ is known as ‘Row’ and the ‘attribute’ is known as ‘Column’.

Data Types in SQL

· Char(n) – fixed length, ncharacter data. Eg : Char(10)

· Varchar(n) – variable ength n character data Eg: varchar(100)

· Number(a,b) – numeric data types for integers and real. A represents total no.of digits and b represents the no of digits in the right side of the decimal point. Eg: number(5,2)

· Date - used for storing date and time.

· Long – character data type.

In Oracle/SQL ‘Boolean’ data type is not used.

No comments:

Post a Comment

Ads

Your Ad Here