Task

Create a table to store addresses.

You may assume that all the addresses to be stored will be located in the USA.   As such, you will need (in addition to a field holding a unique identifier) a field holding the street address, a field holding the city, a field holding the state code, and a field holding the zipcode.   Choose appropriate types for each field.

For non-database languages, show how you would open a connection to a database (your choice of which) and create an address table in it. You should follow the existing models here for how you would structure the table.




╔════════╤════════════════════════════════════════════════════════════════════════╤══════╗
╟────────┘  Format of an entry in the USA address/city/state/zip code structure:  └──────╢
║                                                                                        ║
║ The structure name can be any variable name,  but here it'll be shortened to make these║
║   comments and program easier to read;  its name will be:   @USA  or  @usa   (or both).║
║                                                                                        ║
║ Each of the variable names beginning with an underscore (_) aren't to be used elsewhere║
║   in the program.  Other possibilities are to have a trailing underscore (or both)  or ║
║   some other special eye─catching character such as:    !   @   #   $   ?              ║
║                                                                                        ║
║ Any field not specified will have a value of a  null   (which has a length of zero).   ║
║                                                                                        ║
║ Any field may contain any number of characters,  this can be limited by the            ║
║   restrictions imposed by the standards  or  the USA legal definitions.                ║
║ Any number of fields could be added  (with testing for invalid fields).                ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.0             the number of entries in the   @USA  stemmed array.                ║
║                                                                                        ║
║       nnn           is some positive integer of any length (no leading zeros).         ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._name     is the name of person, business,  or a lot description.            ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._addr1    is the 1st street address                                          ║
║  @USA.nnn._addr2    is the 2nd street address                                          ║
║  @USA.nnn._addr3    is the 3rd street address                                          ║
║  @USA.nnn._addrNN      ···  (any number,  but in sequential order).                    ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._state    is the USA postal code for the state, territory, etc.              ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._city     is the official city name,  it may include any character.          ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._zip      is the USA postal zip code  (five or ten digit format).            ║
╟────────────────────────────────────────────────────────────────────────────────────────╢
║  @USA.nnn._upHist   is the update history:  userID who did the update; date, timestamp.║
╚════════════════════════════════════════════════════════════════════════════════════════╝
