Clarification regarding definition of structure sheaf in spec In Hartshorne's algebraic geometry,sections for a open set U in spec A is defined as $s:U\to$$\bigsqcup_{p} A_{p}$ such that $s(p)\in A_{p}$.
It is also mentioned there for every p in U there is an open neighbourhood V of p contained in U such that $\forall q$$\in V$, s(q)=a/f where $f\notin$$q$.
Now my question is why the second condition is mentioned at all?  Because from the first condition we know $s(q)$$\in A_{q}$ and the elements of localization of A at q look like of the form a\f so the second condition seems redundant.
Also how s is similar to regular function at a point in variety.In variety it is represented locally as quotient of two polynomials but here it is merely quotient of two elements of A?

This is precisely because you are implicitly dealing with the sheafification of the obvious presheaf. Look back at the process of sheafification from $II.1.2$. About the second question, perhaps read $II.1.0.1$.
See this excellent answer.
