0

I need to build a simple CRUD application and connect it to a database, class looks like

public class Employee 
{ 
private int id;
private String email;
private String address;
private String(Datatype ???) avatarURL;
}

The database i use is Postgres

CREATE TABLE employees
(
  id INTEGER PRIMARY KEY,
  email VARCHAR NOT NULL,
  address VARCHAR NOT NULL,
  avatarURL Datatype(???)
);

Obviously, the image value should look like a direct URL to an image, not such as a text and be shown as a picture on a page. And since I can update a picture I want this field to have a "Choose a file" field as well as "Or load from URL", so I can change a picture from local file on a computer. What a datatype should I use?

0 Answers0