relational database defined

What is a table?

What is a data type?

Show most used data type table from notes

Why do tables have key columns?

What different types of keys are there?

How does the database represent missing data?

*In SQL queries you can specifically test for NULL values.

LS0tCnRpdGxlOiAiV2hhdCBpcyBhIFJlbGF0aW9uYWwgRGF0YWJhc2U/IgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgojIHJlbGF0aW9uYWwgZGF0YWJhc2UgZGVmaW5lZAoqIEEgYHJlbGF0aW9uYWwgZGF0YWJhc2VgIGlzIGEgY29sbGVjdGlvbiBvZiBkYXRhIGl0ZW1zIG9yZ2FuaXNlZCBhcyBhIHNldCBvZiB0YWJsZXMuIAoKKiBSZWxhdGlvbnNoaXBzIGNhbiBiZSBkZWZpbmVkIGJldHdlZW4gdGhlIGRhdGEgaW4gb25lIHRhYmxlIGFuZCB0aGUgZGF0YSBpbiBhbm90aGVyIG9yIG1hbnkgb3RoZXIgdGFibGVzLiAKCiogVGhlIHJlbGF0aW9uYWwgZGF0YWJhc2Ugc3lzdGVtIHdpbGwgcHJvdmlkZSBtZWNoYW5pc21zIGJ5IHdoaWNoIHlvdSBjYW4gcXVlcnkgdGhlIGRhdGEgaW4gdGhlIHRhYmxlcywgcmUtYXNzZW1ibGUgdGhlIGRhdGEgaW4gdmFyaW91cyB3YXlzIHdpdGhvdXQgYWx0ZXJpbmcgdGhlIGRhdGEgaW4gdGhlIGFjdHVhbCB0YWJsZXMuIAoKKiBUaGlzIHF1ZXJ5aW5nIGlzIHVzdWFsbHkgZG9uZSB1c2luZyBTUUwgKFN0cnVjdHVyZWQgUXVlcnkgTGFuZ3VhZ2UpLiBUaGlzIGlzIGEgcmVsYXRpdmVseSBzdHJhaWdodCBmb3J3YXJkIGxhbmd1YWdlIHRvIGxlYXJuLCBjZXJ0YWlubHkgZm9yIHNpbXBsZSBxdWVyaWVzLiAKCiogWW91IGNvdWxkIGhhdmUgYSByZWxhdGlvbmFsIGRhdGFiYXNlIHdpdGggb25seSBvbmUgdGFibGUsIGJ1dCB0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