I have a table let say 250 URL:
create table url (
id serial,
url varchar(64)
)
These URLs correspond to each website. Each of the sites has a different popularity. Let's say that the most popular is id=125(a center centered on the Gaussian), the least popular are those that have id=1or id=250.
I want to populate the “log” table as follows with the URL value among those listed in the “url” table, but given that different URLs may appear more often (for example, a URL whose id 125 will be the most popular).
create table log (
id serial,
url_id integer
)
I want to avoid use random()as it is homogeneous and not very "real".
How can this be achieved with Postgresql?