Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statements and CBO: Consider using many-to-many relation to bills #185

Closed
aih opened this issue Feb 16, 2021 · 1 comment
Closed

Statements and CBO: Consider using many-to-many relation to bills #185

aih opened this issue Feb 16, 2021 · 1 comment
Assignees

Comments

@aih
Copy link
Collaborator

aih commented Feb 16, 2021

The Statements of Administration Policy and CBO score reports both have bill information, but we are not currently making a relationship with the bills in the bill table. Instead, we store the bill number, congress number, etc. in each of the two tables (statements and cboreports) independent of the bill model. By contrast, the crs_reports table has a many-to-many relationship with the bill table.

Storing the bill data separately in each table has the advantage that we can have a record for the Statements where we don't have a bill for some reason (e.g. the bill number scraped in Statements is not valid, because of the White House wrote it wrong or in a format we don't support). It also may make performance and memory overhead faster to retrieve bill data directly from the Statements. However, it is not a clean database model to maintain and we lose the true relationship between the bill model and these others. In the crs_reports table, we simply skip reports that we can't relate to an existing bill in the bill table, and maybe that is not ideal either.

This issue is to consider the advantages of using a many-to-many model in these tables to relate to the bills table. We may store the scraped bill information as bill_orig in the Statements table, for example, to avoid losing the scraped data.

@aih
Copy link
Collaborator Author

aih commented Apr 8, 2021

Not relevant at this time.

@aih aih closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants