As to your second question, remember that miles are always awarded according to operating carrier and ticketed class is then translated through an often rather obscure method, normally a cheap ticket will unsurprisingly translate into a "cheap" fare bucket. Normally codeshares come up when you have some sort of connecting flight like SK CPH-ORD and then a SK-codeshare flight ORD-DFW (operated by UA to give an example)...