  Linear error-correcting codes can be used for constructing secret sharing
schemes; however finding in general the access structures of these secret
sharing schemes and, in particular, determining efficient access structures is
difficult. Here we investigate the properties of certain algebraic
hypersurfaces over finite fields, whose intersection numbers with any
hyperplane only takes a few values; these varieties give rise to $q$-divisible
linear codes with at most $5$ weights. Furthermore, for $q$ odd these codes
turn out to be minimal and we characterize the access structures of the secret
sharing schemes based on their dual codes. Indeed, the secret sharing schemes
thus obtained are democratic, that is each participant belongs to the same
number of minimal access sets and can easily be described.
