Sie sind auf Seite 1von 42

THE INSTITUTE OF CHARTERED

ACCOUNTS OF INDIA

m  

SUBMITTED BY: SUBMITTED TO:


RAJ KUMAR MR. SHAILESH DUBEY
COMPUTER NO. 155
BATCH : EVENING( SEC D)
ACKNOWLEDGEMENT

The satisfaction that accompany the successful completion of any


task would be incomplete without the mention of people who made
it possible with their constant guidance and encouragement.
I am indebted to number of persons for sharing their insight and
experiences with me. Notable among them are VINAY SIR,
SHAILESH SIR, AND TUSHARIKA MAM.
I sincerely acknowledge the timely guidance, helped, assistance
and continuous encouragement that I have received from them.
AND ABOVE ALL I WANT TO THANK MY PARENTS FOR
THEIR BLESSINGS.
?    
 
   

 
   
 
  



      
         
 
    
•

?   
  
? 
 


 

? 
 


 

?  
  

 


? 
 

  
 

   
!m"!##!$%&m %m!%''(#)
¥  


• 
 

•
•  
 


 !
• 
• 
 ¥

p   •"
¥ 
  • #$
•

•


• • 
•
•
 
Y ¬ Y  Y  

% 
   

 
   

#$
   
ñ ñ 


    








 ñ










 




!" ñ 


   



 




# $ 
   %


 


!" ñ $& $&$ '
 
 ( 

  


  

) (

' 
 

 ñ $& $&$ 
 

  *

( 




 (
' 
 

&'&&()(%

 !"#$%?!%%& '( 


     



  %

 

+ ,

- (



 '

.
¬!
 

© w  (   


%


 ' 




( ( /

 M  


 

(
) 
  


  
 





?!'*!!+*!%$"& ,&*$*?& $%&"-




 ((   





p p
M   
             
 
               
  
   
   
º#('(0#.$1
¬$-$0¬.¬1 *• *•*
*)• )•

%)&'Y) ((
* ,
& - ¬ &*&+( ¬ &*&+(
-
,
*&(
*&(

( ' &*&+
Y (,Y

2 #2!3!
2 #2!3!.¬14
(

 
(
51 

%
 
  

º1 %
   

56$-#$!0¬.$1 *• ,)%%
*)
*)•

&YY
%)&'Y)*
)**)

¬ # '.(*
( ' )*Y
') '
*&( *&(

'.(*
( 'Y
'Y
•&*-')&*-
* *•
*)• *)•
%)&'Y ( '
)*

$ # &*&+(
( ' &*&+
(- , *&(
*&(

%"
m#(%
(%
) ,( (*Y"(&'&.!
%&*+.&+(
1.4.G.L.-STRUCTURED QUERY LANGUAGE
2. 3.G.L.- COBOL, BASIC, PASCAL

STRUCTURED QUERY
LANGUAGE

-IT IS A LANGUAGE FOR DATA RETRIEVAL

-WIDELY USED IN CLIENT SERVER APPLICATION

-THE USE OF SQL IS AN EFFECTIVE WAY TO ENSURE


DATA CONSISTENCY

-SQL STATEMENTS ARE FREE FORM STATEMENTS


THREE BASIC DATA FUNCTIONS PROVIDED BY SQL:

1. DATA DEFINITION LANGUAGE


-CONSISTS OF COMMANDS TO CREATE THE OBJECTS
SUCH AS TABLES VIEW, INDEXES ETC.
2. DATA MANIPULATION LANGUAGE

-USED FOR QUERY, INSERTION , DELETION AND


UPDATION OF INFORMATION STORED IN DATA BASE

3. DATA CONTROL LANGUAGE

-USED FOR DATA CONTROLLING

4.DATA ADMINISTRATION

-USED FOR ACCESS TO THE DATA BASE


PARTS OF SELECT STATEMENT:

THE FULL SYNTAX OF SELECT STATEMENT IS COMPLEX


BUT MAIN CLAUSE CAN BE SUMMERISED AS:

1. SELECT- COLUMN TO BE DISPLAYED

SELECT _LIST
[INTO NEW_TABLE_NAME]

2. FROM- TABLE TO BE REFERED FROM TABLE_LIST


3.WHERE- SEARCH_CONDITION
4.[GROUP BY]-DEVIDING INTO GROUPS
5.[HAVING]-GROUP CONDITION
EXAMPLE:
SELECT FIRST NAME,LAST NAME, MONTHLY FEES
FROM MEMBER, MEMBERSHIP PLANS
WHERE MEMBER.MEMEBER ID
=MEMBERSHIP PLANS,MEMBER ID
ORDERED BY LAST NAME
  
S.Q.L STATEMENT:
EXAMPLE.1-SELECT S.Q.L -
FIRST_NAME FROM TABLE1
WHERE RESULT
MONTLY_SALARY>25000
EXAMPLE:2 SELECT FIRST_NAME FROM TABLE1
WHERE LAST_NAME=SHARMA

S.Q.L TABLE
   

m  
m 
   %&m  *  +m 

(
  
 

 m 
 

  *    ,
    

 
  

    
   
 ,
 +  ,  -
 
  
   
 

  -
- -  
 
Go to ³run´ & then type ³msaccess´. After a short
delay, the Microsoft Access 2007 main window
displays a dialogue box.
Primary Key: after
using it we can
not fill any null
value and Repeat
value.

An expression
that limit the
values
That can be
entered in the
field.
Then u
feed any
data
which
you
want to
keep as
a
database
RELATIONSHIP
o Relationship is an association between entities. It is represented by
diamond in ER diagram.

DEGREE OF RELATIONSHIP

o The degree of relationship, indicates the link between the two


entities for a specified occurrence of each. The degree of
relationship is also called ³Cardinality´.Conceptual models use
three type of relationships to describe associations among data
and these are as follows««««
ONE TO ONE RELATIONSHIP
1 1
Employee PF.No.
MANY TO ONE RELATIONSHIP

Employee1 N 1
Employee2 Department

Employee3

MANY TO MANY RELATIONSHIP

Vender1 Item1

N M

Vender2 Item2
CREATING RELATIONSHIP AMONG TABLES

When a table contains too many fields, it can be split up into


two or more tables. These table will be related to each other by
common field. For Exp. an employee table containing name
and employee ID of employee will be related to payroll table
containing details of salary of the employees .TO create
relationship we must follow the following steps««..

CLICK AT RELATIONSHIP
ICON ON THE RIBBON
SELECT THE TABLES
IN WHICH RELATION
IS TO ESTABLISH
CLICK ON ADD
BUTTON TO
ADD TABLES

SELECT THE FIELD


TO LOGICALLY
RELATE
Always click all
three options
RELATIIONSHIP
AMONG TABLES
WILL BE SHOWN BY
A LINE BETWEEN
TWO TABLES

AFTER CREATIING
RELATIONSHIP , TABLE WILL
LOOK AS THIS

BY CLICKING ON THE
³+´ SIGN WE CAN
ACCESS DATA IN
RELATED TABLE
INTRODUCTION TO QUERIES
We can use queries to filter our data, to perform calculation with
our data, and to summarize our data.

)"(,"Y(/

o Y,') &%%'),(&'(&&'&'&%(
,),(&'('&&*&"(Y'
o /(&*,(&'(&&'&'&%()  *
&"Y*+&0('&Y%) Y (,(*'
'&'(&*&"(Y'') ,(1
23
è.(,Y()#'.((/#
!$%'0(#m
1%2(034(

o) (* *&"Y*+&0&'&'&%(

o )*' (,(&'('&%Y4è.(,-
(Y+*
o &Y&%)+()5) (*
o +)')&.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  
# 

$
  



 :
$   
•

 &  
   9

   
  

6 :$      
 
• &  


   

#
  
 
:6     

#
 
 
#
#
 
6 #  6 #6   #•
  ë  
    
      
 
 

§  
 
   





! 
  

  
$   
  

%

$ §!!&

''
 

 (  '
 
)'
 

  
   


" 
  


    #
 
      
+
   "


  ,
#   
      

   
  ' #
-
#
  

#
  #

   

   #



*
  $ 

#
   
 
+#  
#

  
  
 
#    

    
  
 
'
     

+
       ,
 .
       
   

  ' #-
#
  
#

  #
    

    '


#   
 
    

#
 

  
 
   
#
  
  #
 - #
'#  


•/ 




• 
#

# 
¥ , 
  '#
 
9
6

# 
# 
•Y

  

#
#
$  6#


•
•   '#
 


#
  $ •
• +   '#
 


# #  
•
• 
 '#
 
 $
#•
• +  
 '#
 


# #  •
=•  
 '#
 


# $ •
>• , 
 
 '#
 


# 
# 
•