Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion 02_activities/assignments/DC_Cohort/Assignment1.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,11 @@ Consider, for example, concepts of fariness, inequality, social structures, marg

```
Your thoughts...
```

In the article “When Databases Get to Define Family, Qadri (2021)” explores how the design of the Pakistani national identity database implicitly embeds a normative family model, one in which every individual must be linked to two married parents and a biological household. This design choice is not merely technical. It encodes social judgments about which family structures are legitimate and which are not, and as a result excludes or marginalizes individuals whose lived reality diverges from this “normative model”. As a researcher in Neurorehabilitation and chronic condition management, I recognize parallels in how health data systems also embed assumptions (for example, around “normative” bodies) that may overlook people with non-standard trajectories like spinal cord injury (SCI) or multiple sclerosis (MS). The article prompts me to consider: whose experiences are built into my data schemas? Whose are left out? And what are the ethical implications when individuals’ access to services depends on how a database was structured?
In my clinical practice, I often see how implicit value systems are operationalized through data forms, electronic health records, and even automated rehabilitation algorithms. Most of these systems are designed through a binary lens, not only in terms of gender (where “male” and “female” are often the only options) but also in terms of ability and dependence. Such databases, built and governed by a narrow group of political and technical elites, who dictate what “normal” is, and by extension, who counts as a full member of society. When data categories are designed to fit the lives of a few, everyone else is forced to conform, or risk erasure.
For example, in many cases of SCI, whether from a motor vehicle accident (traumatic etiology) or a non-traumatic cause such as transverse myelitis, a patient may lose motor and sensory function below their neurological level of injury. Despite retaining full cognitive and emotional capacity, these individuals are often misjudged by society as being child-like or incapable of decision-making. I recall one of my patients’ wives was repeatedly asked to speak on his behalf by airline staff while boarding a flight; the crew directed every question to her, assuming he could not respond for himself. This kind of assumption-rooted in social biases and reinforced by institutional data categories, reduces a person’s autonomy to how “normal” they appear physically.
As clinicians and researchers, we rely heavily on digital health databases that record functional independence, cognitive scores, and diagnostic classifications. Yet these same databases rarely capture the nuance of patients’ lived experience of those living with chronic neurological conditions. They are often built upon value systems that prioritise efficiency, compliance, and standardization over empathy, diversity, and inclusion. Just as the national database in Pakistan defined the boundaries of family, our medical databases risk defining the boundaries of personhood, often through narrow and binary logic.
Ethically, this calls for a re-imagining of data systems through a framework of inclusivity and justice. Rather than allowing a minority of political or technical decision-makers to dictate the structure of our collective data realities, the design of these systems should be participatory, involving patients, caregivers, clinicians, and marginalized voices. In the context of neurorehabilitation, this could mean allowing for multiple identity markers (beyond gender binaries), recording narratives of lived experience alongside clinical codes, and giving patients more control over how their information is represented.


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions 02_activities/assignments/DC_Cohort/assignment_one.sqbpro
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="/Users/sainaaliabadi/Desktop/AssignmentML/SQL/sql/05_src/sql/farmersmarket.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="structure browser pragmas query" current="3"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="7306"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><table title="customer_purchases" custom_title="0" dock_id="1" table="4,18:maincustomer_purchases"/><dock_state state="000000ff00000000fd0000000100000002000002cf0000021ffc0100000001fb000000160064006f0063006b00420072006f00770073006500310100000000000002cf0000011d00ffffff000002cf0000000000000004000000040000000800000008fc00000000"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="assignment1" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="300"/><column index="2" value="300"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="booth" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="104"/><column index="2" value="125"/><column index="3" value="300"/><column index="4" value="83"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="customer_purchases" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="80"/><column index="2" value="73"/><column index="3" value="91"/><column index="4" value="91"/><column index="5" value="62"/><column index="6" value="184"/><column index="7" value="119"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="product" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="80"/><column index="2" value="206"/><column index="3" value="93"/><column index="4" value="145"/><column index="5" value="124"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="vendor" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="73"/><column index="2" value="170"/><column index="3" value="157"/><column index="4" value="178"/><column index="5" value="175"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="vendor_booth_assignments" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="74"/><column index="2" value="106"/><column index="3" value="92"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1*">SELECT *
FROM customer;
SELECT *
FROM customer
ORDER BY customer_last_name, customer_first_name
LIMIT 10;
SELECT *
FROM customer_purchases
WHERE product_id IN (4, 9);
SELECT *,
(quantity * cost_to_customer_per_qty) AS price
FROM customer_purchases
WHERE customer_id BETWEEN 8 AND 10;
SELECT
product_id,
product_name,
CASE
WHEN product_qty_type = 'unit' THEN 'unit'
ELSE 'bulk'
END AS prod_qty_type_condensed,
CASE
WHEN LOWER(product_name) LIKE '%pepper%' THEN 1
ELSE 0
END AS pepper_flag
FROM product;
SELECT
v.vendor_id,
v.vendor_name,
v.vendor_type,
v.vendor_owner_first_name,
v.vendor_owner_last_name,
vb.booth_number,
vb.market_date
FROM vendor AS v
INNER JOIN vendor_booth_assignments AS vb
ON v.vendor_id = vb.vendor_id
ORDER BY
v.vendor_name,
vb.market_date;
SELECT
v.vendor_id,
v.vendor_name,
COUNT(vb.booth_number) AS booth_rental_count
FROM vendor AS v
INNER JOIN vendor_booth_assignments AS vb
ON v.vendor_id = vb.vendor_id
GROUP BY v.vendor_id, v.vendor_name
ORDER BY booth_rental_count DESC;
SELECT
c.customer_id,
c.customer_first_name,
c.customer_last_name,
SUM(cp.quantity * cp.cost_to_customer_per_qty) AS total_spent
FROM customer AS c
INNER JOIN customer_purchases AS cp
ON c.customer_id = cp.customer_id
GROUP BY c.customer_id, c.customer_first_name, c.customer_last_name
HAVING total_spent &gt; 2000
ORDER BY c.customer_last_name, c.customer_first_name;


CREATE TEMP TABLE new_vendor AS
SELECT *
FROM vendor;


INSERT INTO new_vendor (
vendor_id,
vendor_name,
vendor_type,
vendor_owner_first_name,
vendor_owner_last_name
)
VALUES (
10,
'Thomass Superfood Store',
'Fresh Focused store',
'Thomas',
'Rosenthal'
);
SELECT
customer_id,
STRFTIME('%m', market_date) AS purchase_month,
STRFTIME('%Y', market_date) AS purchase_year
FROM customer_purchases;
SELECT
customer_id,
SUM(quantity * cost_to_customer_per_qty) AS total_spent_april_2022
FROM customer_purchases
WHERE STRFTIME('%m', market_date) = '04'
AND STRFTIME('%Y', market_date) = '2022'
GROUP BY customer_id
ORDER BY total_spent_april_2022 DESC;
</sql><current_tab id="0"/></tab_sql></sqlb_project>
93 changes: 93 additions & 0 deletions 02_activities/assignments/DC_Cohort/assignment_one.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
SELECT *
FROM customer;
SELECT *
FROM customer
ORDER BY customer_last_name, customer_first_name
LIMIT 10;
SELECT *
FROM customer_purchases
WHERE product_id IN (4, 9);
SELECT *,
(quantity * cost_to_customer_per_qty) AS price
FROM customer_purchases
WHERE customer_id BETWEEN 8 AND 10;
SELECT
product_id,
product_name,
CASE
WHEN product_qty_type = 'unit' THEN 'unit'
ELSE 'bulk'
END AS prod_qty_type_condensed,
CASE
WHEN LOWER(product_name) LIKE '%pepper%' THEN 1
ELSE 0
END AS pepper_flag
FROM product;
SELECT
v.vendor_id,
v.vendor_name,
v.vendor_type,
v.vendor_owner_first_name,
v.vendor_owner_last_name,
vb.booth_number,
vb.market_date
FROM vendor AS v
INNER JOIN vendor_booth_assignments AS vb
ON v.vendor_id = vb.vendor_id
ORDER BY
v.vendor_name,
vb.market_date;
SELECT
v.vendor_id,
v.vendor_name,
COUNT(vb.booth_number) AS booth_rental_count
FROM vendor AS v
INNER JOIN vendor_booth_assignments AS vb
ON v.vendor_id = vb.vendor_id
GROUP BY v.vendor_id, v.vendor_name
ORDER BY booth_rental_count DESC;
SELECT
c.customer_id,
c.customer_first_name,
c.customer_last_name,
SUM(cp.quantity * cp.cost_to_customer_per_qty) AS total_spent
FROM customer AS c
INNER JOIN customer_purchases AS cp
ON c.customer_id = cp.customer_id
GROUP BY c.customer_id, c.customer_first_name, c.customer_last_name
HAVING total_spent > 2000
ORDER BY c.customer_last_name, c.customer_first_name;


CREATE TEMP TABLE new_vendor AS
SELECT *
FROM vendor;


INSERT INTO new_vendor (
vendor_id,
vendor_name,
vendor_type,
vendor_owner_first_name,
vendor_owner_last_name
)
VALUES (
10,
'Thomass Superfood Store',
'Fresh Focused store',
'Thomas',
'Rosenthal'
);
SELECT
customer_id,
STRFTIME('%m', market_date) AS purchase_month,
STRFTIME('%Y', market_date) AS purchase_year
FROM customer_purchases;
SELECT
customer_id,
SUM(quantity * cost_to_customer_per_qty) AS total_spent_april_2022
FROM customer_purchases
WHERE STRFTIME('%m', market_date) = '04'
AND STRFTIME('%Y', market_date) = '2022'
GROUP BY customer_id
ORDER BY total_spent_april_2022 DESC;