0% found this document useful (0 votes)
5 views16 pages

Rest Api

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Rest Api

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

REST API

• REST-Representational State Transfer


• Where,what-API divided into 3 types
1.SOAP API
2. REST API
3.RPC API
• SOAP API
- Simple Object Acess Protocol
-must and should client server
- developed by Microsoft
- it have standard protocol,so very complex .
- data exchange in xml
-action oriented
• REST API
-popular and flexible
-data exchange in xml or json
- future API is websocket API
-resource oriented.
• RPC API
- Remote Procedure Calls.
-client sends the request for procedures in server and server sends the output
back to client.
-it is action oriented.
WHAT ARE REST API

• REST defines a set of functions like GET,PUT,DELETE,POST that clents has to


use with http protocol.
• REST API is resource oriented.
• For e.g., school app
• Two resources-student information,teacher information.
• If client sends request in the form of api/student.
• If it is action oriented then the clent sends the request
• Api/saveteacher,api/deleteteacher
REST CONSTRAINTS

• Client-server-json
• Stateless-server not store the data
• Cache-at the time of sending request server send response in the form of
cache or not cache.cache means store the information not cache means not
store the information
• Uniform resource-web application or desktop or mobile sending request must
and should be uniform
• Layered system
• Code on demand
BUILDING AN APPLICATION USING MAVEN

• Maven-build tool helps in project management


• Maven is written in java and is based on Project Object Model(POM)
1. POM is an XML file contains information about project
2. When we execute the project maven searches for POM in the current
directory.
HOW MAVEN CAN KNOW WHAT
CONCEPTS WE ARE IMPLEMENTING IN
OUR PROJECT?
• 1. pom.xml file will automatically comes into our project when we are using
maven
• 2.In pom.xml file we have to tell in tags what concepts we are implementing.
i.e., in <dependency></dependency>
UNIT-5
DATABASE AND DEPLOYMENT
• DATABASE-to store the data we use database
• Based on queries in database we manage the data,
• To perform any operation on database we use SQL.
• Examples for database systems are oracle,db2,mysql,ingress, e,t,c.,
• Database operations- CRUD operations
1. Create
2. Read
3. Update
4. delete
• Create
create database school;
show databases-it will show all the databases.
Creating table and inserting data
Create table tablename(col,datatype,col2,datatype2-------)
e.g., create table students(rno number,name varchar(100),class varchar(100))
Insert into students values(1,’gayathri’,’mca’)
• Reading
select name,class from students where rno=1;
• Update
update students set name=‘ravi’ where rno=1;
• Delete
delete from tablename
delete from students where rno=2;
FUNCTIONAL DEPENDENCY

rno name course


72 ramesh python
72 ramesh java
73 mahesh python
74 mahesh c
75 naresh java
• Functional dependency tell us one or more attributes of a relation depends
on one or more attributes of same relation.
• It is denoted by A->B(A determines B)
B dependent on A
A->B(A is determinant,B is dependent)
If t1.A=t2.A then t1.B=t2.B then A->B is true.
A B
10 1
20 2
30 3
10 1
• Rno->name functional dependency
• Rno->course
• Course->name not in functional dependency
• (rno,name)->course

You might also like