question on size of relational DB
-
hi all, I want just to know some thing about the size of DB, if we have DB with 2 tables with no relations between both of them (no PK and FK) so does its size is less than the same one which we make a relation between both of its tables. I want to know even there is a small increment on the size of DB where there is a relation between its tables instead of the one where there is no relation between their table. thanks for the help from all :laugh:
Thanks alot Hamody
-
hi all, I want just to know some thing about the size of DB, if we have DB with 2 tables with no relations between both of them (no PK and FK) so does its size is less than the same one which we make a relation between both of its tables. I want to know even there is a small increment on the size of DB where there is a relation between its tables instead of the one where there is no relation between their table. thanks for the help from all :laugh:
Thanks alot Hamody
Hi, When you add relation between tables (foreign key) only a small amount of data is added to system tables. The foreign key is enforced without any additional space requirements on your tables (however the system tables where the foreign key is defined are stored in the same database so they use a small amount of space, as data always does). When defining primary key, the information is also added to system tables, but in this case an index is typically also built to quarantee performance of the primary key. The size of the index can vary a lot so there's no way of saying how much space it will consume without the knowledge of the primary key definition along with table definition. Hope this helps, Mika