Overseas techniques might be named identifiers, as well, but they select the fresh relationships anywhere between dining tables, not the fresh new tables by themselves

Overseas techniques might be named identifiers, as well, but they select the fresh relationships anywhere between dining tables, not the fresh new tables by themselves

To answer which question, it is necessary to not ever confuse a good NULL worth on well worth out-of 0 or that have good “NONE” reaction. Rather, consider a null worthy of due to the fact a lost really worth. 0 or “NONE” might possibly be viewpoints assigned from the affiliate, when you find yourself “NULL” is actually a respect assigned of the pc in the event your member enjoys offered no really worth getting confirmed number.

Consider the Customers dining table lower than:

Once you learn John McKinley enjoys registered 0 complaints, up coming regarding the “number of complaints” line from the “Customers” dining table, you could potentially input 0. This doesn’t mean the significance try null – not at all! You have got a property value no, therefore the advice around for it basic number is actually maybe not null. It means John has actually submitted no complaints.

Whenever we don’t have any details about exactly how many complaints John enjoys registered, then the value would-have-been null.

By exact same logic, consider there was an additional column, named “Feedback”, and this was recommended. When your earliest around three people have given certain feedback, if you’re Catherine states she don’t should log off one, does that mean so it really worth is null? No, once the Catherine did not have to render one feedback, therefore we you can expect to mark her reaction just like the “NONE”.

thirteen. What is a primary key and you will a foreign secret?

An initial secret is actually a column (or a collection of columns) whoever really worth exists and is book for each and every number during the an effective table. You should remember that per desk can have one to and singular primary key.

Ergo, you could think about a primary trick since the job (otherwise selection of areas) that makes reference to the message off a table during the a separate ways. Devamını Oku