Reputation: 173
Can someone explain how users accounts works on webpage?
www.website.com/profile?uid=15636373282
or
www.website.com/profile/15636373282
As I know each user gets unique uid.
Does website creates for each user profile folder on server to store user profile webpage and pictures, videos?
I know users name and password are stored in database, but I think that store user profile page ,pictures, videos in database, its insaine.
Can someone help me to understand? thank you
Upvotes: -1
Views: 506
Reputation: 4109
Any user profile has 2 parts: the profile text-fields and media data.
Text fields (id, name, desctption, date of birth, etc) are being stored in database;
Basically media data (avatar image, another files) are being stored on disk in some folder and user id references to this folder.
Yes, the site creates this folder. Media files should not be stored in a database!
The "profile webpage" is absctract concept. Site usually generates this page at runtime using the above parameters from database, and media-data(insert images links to page html for example)
Upvotes: 1
Reputation: 839
No. The website does not create folders for each users.
The ?uid=15636373282
is just a parameter that the web server fetch and retrieve that from the database.
And yes, profile page, pictures and videos are all mostly stored in databases. Though they maybe stored in a different server. Some sites store huge data on a lease or rented servers or some companies that offer cloud storage like Amazon EC2
Upvotes: 1