Sorry, I don't generally watch those things. If you get into the details, it'll probably ruin your viewing experience.
I did my time in L. A. so, here's a local primer:
First, there are several levels of people out there who may be packin' guns - "Peace officers" - in California. From the broadest arrest powers on down to more limited authority, they are (1) Police Officers, Sheriff's Deputies, D. A. Investigators, and others, (2) officers/investigators with the Highway Patrol, Univ. of Calif., Calif State Universities, Fish & Game, Dep't of Corrections, Alcoholic Beverage Control, and others, (3) officers/investigators for the DMV, Horse Racing Board, Fire Marshal, and others. And on down - you get the picture.
LAPD works within the city limits of L.A., with different patrol areas - "Divisions," each one sorta like a small department. They have their own crime lab. A homicide (or other cases) might be worked by a Division detective (Mark Fuhrman) or the bigs guns out of Robbery/Homicide downtown (Lange & Vannatter) or some other specialized unit: Gangs, Bunco/Forgery, Narcotics, etc.
L. A. Sheriff's have jurisdiction over all of the unincorporated areas of L. A. County plus those incorporated cities that contract for their services. Their patrol areas are "Stations." They have their own crime lab. too. They have a similar setup with Station level personnel plus detectives in special centralized units. LASD may assist a small department when it doesn't have the expertise or the manpower to devote to a case, e.g., a small city that has 1 murder every year or two can easily screw up an investigation.
Then there's a bunch of State agencies and Federal agencies. There are State and Federal crime labs. Cooperation between agencies on different and even the same levels ranges from great to non-existent. Turf wars and politics. Generally, no one is looking to take on more work; they're trying to cut case loads, unless there's some positive notoriety at stake (politics again.) There always seems to be a shortage of manpower and resources.
Typically, D.A.'s are not involved until the detective/investigator brings a case to them to file a criminal complaint. Being a skilled trial attorney does not readily equate with being a good investigator or interrogator.
Head spinning yet? ](*,)
The most realistic would probably be shows like Cops, The First 48, North Mission Road (Coroner) that follow around the actual people. Even then, it's like the police equivalent of The Dog Whisperer.