W
WDSnews
If my tables are properly normalized, how can I build a query in which a
table with multiple relationships can correctly join if the daughter and
grand-daughter tables only contain a single linking field and the
great-grand-daughter contains the two distinguishing fields.... for example.
The [Attendance] table contains a record for each month a student has
attendance. Its fields include [Student ID], [Month ID], and [School ID].
The data that applies to a particular school is identified by the [School
ID] field.
The [Month] table contains data specified by the State and applies to all
schools. Its fields include [Max Days] and [Qtr ID]. The [Quarter] table
also contains data specified by the State and applies to all schools. Its
fields include [cumMax Days]. The [School Year] table contains one record
per year per school and is customized to the school. However, data in a
particular record is specified by the State and unique to the school, such
as [Half Year] in which the date of the 88th school day is specified.
In this query the [Attendance] table is the parent table. Its [Month ID]
links to [Month].[ID]. Then [Month].[Qtr ID] links to [Quarter].[ID]. Then
[Quarter].[Year] links to [School Year].[Year]. However with multiple
[Year] records, I need [Attendance].[School ID] to link to [School
Year].[School ID].
I want the query to render one record for each record in the Attendance
table. Unfortunately, Access says I have ambiguous outer joins. What is
the correct way to do this without breaking normalization rules or
unnecessarily duplicating records? The simple solution seems to be adding a
[Year] field to the Attendance table, but that breaks normalization rules
since it already contains a [Month ID] field.
table with multiple relationships can correctly join if the daughter and
grand-daughter tables only contain a single linking field and the
great-grand-daughter contains the two distinguishing fields.... for example.
The [Attendance] table contains a record for each month a student has
attendance. Its fields include [Student ID], [Month ID], and [School ID].
The data that applies to a particular school is identified by the [School
ID] field.
The [Month] table contains data specified by the State and applies to all
schools. Its fields include [Max Days] and [Qtr ID]. The [Quarter] table
also contains data specified by the State and applies to all schools. Its
fields include [cumMax Days]. The [School Year] table contains one record
per year per school and is customized to the school. However, data in a
particular record is specified by the State and unique to the school, such
as [Half Year] in which the date of the 88th school day is specified.
In this query the [Attendance] table is the parent table. Its [Month ID]
links to [Month].[ID]. Then [Month].[Qtr ID] links to [Quarter].[ID]. Then
[Quarter].[Year] links to [School Year].[Year]. However with multiple
[Year] records, I need [Attendance].[School ID] to link to [School
Year].[School ID].
I want the query to render one record for each record in the Attendance
table. Unfortunately, Access says I have ambiguous outer joins. What is
the correct way to do this without breaking normalization rules or
unnecessarily duplicating records? The simple solution seems to be adding a
[Year] field to the Attendance table, but that breaks normalization rules
since it already contains a [Month ID] field.