Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 97121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:56:38+00:00 2026-05-10T23:56:38+00:00

How would one create a REST web service to write a row into a

  • 0

How would one create a REST web service to write a row into a databse table. Use the follwoing scenario:

The table is called Customer – the data to be inserted into the row would be the name, addresss, telephone number, email.

I think its impossible to describe the whole thing end to end in Java or C#, and I would never expect that, but here are the questions I have popping into my head as I prepare for coding:

  • How the URI would look (eg. if you use this URL – http://www.example.com/)?
  • What info would go into the HTTP envelope?
  • Would I use POST when writing to the database in this way?
  • Do I use a resource to store the posted data from the client? Is this even necessary if the data is being written to a database anyway?
  • When the data to be writeen into the db is recieved by the server – how do I physically insert it into the database – do I call some method on the server to actually write the data (in Java)? – this doesn’t seem to fit with truely REST architecture – shunning RPC calls.
  • Should I even be bothering writing to a DB – should I be storing my data as a resource?

As you can see I need a few issues clearing in my head. Any help much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:56:39+00:00Added an answer on May 10, 2026 at 11:56 pm

    First of all, I’m not either java nor c# expert and I don’t exactly know what means do these languages have to support REST design, but in general:

    1. http://www.example.com/customers – customers is a collection of resources and you want to add a new resource to this collection

    2. It depends on various things – you should probably set the content-type header (according to the data format in which you are sending the representation) and set some authentication headers if you need it.

    3. Yes, you always use POST to create a new entry in a collection of resources.

    4. I don’t fully understand this question, to be honest. What do you mean by ‘inmediately writing data into the database’?

    5. REST is primarily just a style of communication between server and a client. It doesn’t say anything about how you should handle the data received by using it. The usual way how modern web approaches (MVC style frameworks) solve it, is by routing every REST action to a method of some class (usually a controller instance) where you handle the received parameters (eg. save them to the database) and generate a response to be sent back.

    For a very brief and very clear introduction to REST have a look at this short video.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 80k
  • Answers 80k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The problem is in this sub expression (byte)(bufferPattern[iRow]) The variable… May 11, 2026 at 4:20 pm
  • Editorial Team
    Editorial Team added an answer Sequence has a find function. val find : ('a ->… May 11, 2026 at 4:20 pm
  • Editorial Team
    Editorial Team added an answer test="categoryName != ''" Edit: This covers the most likely interpretation,… May 11, 2026 at 4:20 pm

Related Questions

I do most of my work with Microsoft technologies these days, so naturally I'm
I am planning on putting up a web service, or some other service exposed
I'm trying to work out a way of passing the web current http context
I am preparing for the development of an enterprise-style application for a very small

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.