Click to See Complete Forum and Search --> : Database filesize
Zoboda
08-06-2004, 05:51 PM
Hi, Im making a site in asp and it allows users to upload files which are then recorded into a database. Im just wondering how big a database can get, idealy I would like to create a table that has a row for every file on the site and then a column for every user, and then in each cell is a rating for the file. I dont know how many users Im going to get or how many files will be uploaded, I cant even think of a rough estimate but how big would a database like this be for a standard site.
CardboardHammer
08-06-2004, 06:12 PM
As far as size goes, I'd think you'd be better off worrying about the total size of the files rather than the size database, as it'll likely be orders of magnitude greater, even with relatively small files.
Zoboda
08-06-2004, 06:38 PM
I dont mind about the files because they are obviously going to take up more webspace but there are two ways I can make a certain part, one is a row for every file and column for every user which is bound to be bigger than the other way I can do it. But if the first way is too big then I have no other choice than not to use it
CardboardHammer
08-06-2004, 08:12 PM
3 tables: Files (filename [character type, unique], fid [integer type, primary key, autoincrement]; Users (username [character type, unique], uid [int, primary key, autoincrement]); Ratings(uid [int, foreign key from Users, part of primary key], fid [int, foreign key from Files, part of primary key], rating [integer type])
Use the smallest types provided by the DBMS you're using that are sufficient for your needs. Index the tables, if your DBMS provides that capability.