this section is talking about where the data comes from in web services
Data is very important in every application because we can't do anything without data! The following are some examples of data source.
Data is not at server side but client side, so the data must be in requests
-
calculate values
-
request
GET /api/math/square? value=5
-
response
{ "value" : 5, "square" : 25 }
-
-
random number
-
request
GET /api/math/random? type=int & min=0 & max=10
-
response
{ "random" : 6 }
-
Data comes from the file system at server side
-
file upload
-
request
POST /api/files [ your file data ]
-
response
{ "id" : "ABC123" }
-
-
web page
a simple web server which serve static html pages
Data is saved in databases and server can read these data from DBMS.
A database is an organized collection of data
A database management system ( DBMS ) is a application that interacts with the user, other applications, and the database itself to capture and analyze data
- user authentication
- all user data is saved in database
- a user tries to login to a website
- the server connect to DBMS to read corresponding user data
- the server validates user certificate by data in database
- the server let user in if the data is matched
Data can be fetched from other connected web services
- Proxy Server