On Jan 10, 2:16 am, "Larry Daugherty"
<Larry.NoSpam.Daughe...@verizon.net> wrote:
> As your analysis of what your application is going to do progresses
> you should be able to identify most of the entities in play in it.
>
> You need to learn about Normalization and then learn to apply it to
> your designs religiously.
Great advice which you haven't followed yourself e.g.
> tblEmployee
> EmployeeID - Autonumber PK
> ...
> EmpSuervisor Long Integer - Foreign Key to supervisor
> record in this table. Implies that you enter bosses first.
At least with your comment "Implies that you enter bosses first"
you've had the decency to admit to introducing insert anomalies and
delete anomalies into the design. You committed the basic flaw of
confusing the entity ("officer") with the relationship ("officership")
by using the same table to model both.
> All entities of a given type belong in the same table. That table is
> usually given a name like the singular of the entity type because that
> is what each record is really about.
Though you are of course free to use the naming convention of your
preference, and while I don't have any statistics (do you?) I'd
speculate that it is more usual to see a collective term used as the
name for an entity table, based on the idea that it is a set that
usually contains more than one e.g. 'LegalPersons'.
> Go visit www.mvps.org/access and search for
> "commandments". Those commandments really spell out a few issues.
Thanks, I haven't read those in a while :)
I get the tongue in cheek nature but would point out they are hardly
universal truths: there are some Access MVPs (I won't name names) who
admit publically to using spaces in database objects' names, who think
it's OK for autonumbers to have meaning and be exposed to users, etc.
If the one about "write comments [to] explain each variable" was
followed religiously (sorry <g>!), it would IMO be really annoying for
both code writer and reader. Personally I think virtually the
opposite: that a variable's name, type and context should convey its
purpose. I'd rather see a long and meaningful variable name than a
well-commented single-letter name (note that I think the need for
either is likely a symptom of a large sub procedure that should be
split into multiple smaller sub procedures). What comments to explain
variables are due in the VBA (aircode) below? (none, IMO):
Dim thisDoc As IDocument
Set thisDoc = Binder.Documents("Tony's Object Naming Conventions")
Dim thisConv As CNamingConventionDocument
Set thisConv = thisDoc
BTW if you don't get from the above that the class
CNamingConventionDocument Implements the interface IDocument then thou
shalt not maintain my code ;-)
Jamie.
--