sql - Do foreign keys have size? -


i calculating database size , had 1 doubt foreign keys. have size? if references, occupy 2 different positions in memory?

the columns make foreign key do, of course, have size, occupy same amount of space whether or not participating in foreign key relationship.

most database products require target column(s) of foreign key reference indexed - but, again, such index can exist in absence of foreign key relationship.

thirdly, foreign key require small (fixed) amount of metadata record existence.

beyond that, there may database products require additional space implement some foreign key features, such cascading deletes. such details product specific.

but in general, plain foreign keys, there should no additional storage requirement.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -