PII_type: EMAIL

Exploration_sql:
Based on the schema of the tables in the database, the following columns have the potential to contain email addresses:
- Alarm: email_address
- Calendar: self_identity_email, owner_identity_email
- CalendarItem: contact_identifier
- Identity: address
- Store: display_name, address, first_name, last_name

To search for email addresses in these columns, you can use the following SQL query:

```sql
SELECT email_address FROM Alarm WHERE email_address REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT self_identity_email FROM Calendar WHERE self_identity_email REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT owner_identity_email FROM Calendar WHERE owner_identity_email REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT contact_identifier FROM CalendarItem WHERE contact_identifier REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT address FROM Identity WHERE address REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT display_name FROM Store WHERE display_name REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT address FROM Store WHERE address REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT first_name FROM Store WHERE first_name REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
UNION ALL
SELECT last_name FROM Store WHERE last_name REGEXP '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
```

This query will search for email addresses in the specified columns of the respective tables.

PII_Prompt: a unique identifier for a destination to which electronic mail (email) can be sent and received over the internet; examples include jane.doe@example.com, john.smith@provider.net, dev-team@startup.io, and user.name+label@domain.org


PII_type: PHONE

Exploration_sql:
Based on the schema of the available tables, the following tables and columns may contain US phone numbers:
1. Table: CalendarItem
   - Columns: organizer_id, self_attendee_id, self_identity_phone_number, owner_identity_phone_number

2. Table: Identity
   - Columns: display_name, address, first_name, last_name

To search for US phone numbers in these tables, you can use the following SQL queries:

```sql
SELECT organizer_id FROM CalendarItem WHERE organizer_id REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT self_attendee_id FROM CalendarItem WHERE self_attendee_id REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT self_identity_phone_number FROM CalendarItem WHERE self_identity_phone_number REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT owner_identity_phone_number FROM CalendarItem WHERE owner_identity_phone_number REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT display_name FROM Identity WHERE display_name REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT address FROM Identity WHERE address REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT first_name FROM Identity WHERE first_name REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
UNION ALL
SELECT last_name FROM Identity WHERE last_name REGEXP '\+?[0-9]{1,4}[- .]?\(?[0-9]{1,3}?\)?[- .]?[0-9]{1,4}[- .]?[0-9]{1,4}[- .]?[0-9]{1,9}'
```

These queries will search for US phone numbers in the specified columns of the CalendarItem and Identity tables.


PII_type: USERNAME

Exploration_sql:
Based on the schema of the tables in the database, the following tables and columns have the potential to contain usernames:
- Table: Alarm, Column: email_address
- Table: Calendar, Columns: display_name, address, first_name, last_name
- Table: Identity, Columns: name
- Table: Recurrence, Columns: name
- Table: Store, Columns: owner_name

To search for possible usernames in these columns, you can use the following SQL query:
```sql
SELECT email_address AS username FROM Alarm WHERE email_address REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT display_name AS username FROM Calendar WHERE display_name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT address AS username FROM Calendar WHERE address REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT first_name AS username FROM Calendar WHERE first_name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT last_name AS username FROM Calendar WHERE last_name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT name AS username FROM Identity WHERE name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT name AS username FROM Recurrence WHERE name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'
UNION ALL
SELECT owner_name AS username FROM Store WHERE owner_name REGEXP '\\b[a-zA-Z][a-zA-Z0-9._-]{2,51}\\b'

PII_Prompt: a username is a short textual identifier chosen by a user to represent their account or public handle within an application or service it is stored as plain text contains no whitespace does not include a domain component and is intended for human recognition rather than internal system uniqueness


Exploration_sql:
Based on the schema of the tables in the database, the following tables and columns have text fields where person names might be found:
- CalendarItem: contact_name
- Identity: name
- Category: display_name, address, first_name, last_name

To search for possible person names in these columns, you can use the following SQL query:

```sql
SELECT contact_name FROM CalendarItem WHERE contact_name REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'
UNION ALL
SELECT name FROM Identity WHERE name REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'
UNION ALL
SELECT display_name FROM Category WHERE display_name REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'
UNION ALL
SELECT address FROM Category WHERE address REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'
UNION ALL
SELECT first_name FROM Category WHERE first_name REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'
UNION ALL
SELECT last_name FROM Category WHERE last_name REGEXP '[A-Za-z][A-Za-z\s\.\-]{1,50}'

PII_Prompt: a loosely structured human name-like strings that typically consist of a first name, a first name and a last name, and may also include middle names, initials, prefixes (e.g., Mr., Dr.), and suffixes (e.g., Jr., Sr.)


Exploration_sql:
Based on the schema of the available tables, the following tables and columns have the potential to contain US postal addresses:

1. Table: CalendarItem
   - Columns: summary, location_id, description, notes, location_prediction_state, structured_data, local_structured_data

2. Table: Store
   - Columns: display_name, address, first_name, last_name

To search for US postal addresses in these tables, we can use the following SQL queries:

```sql
SELECT summary FROM CalendarItem WHERE summary REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|ter\\.?|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT location_id FROM CalendarItem WHERE location_id REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT description FROM CalendarItem WHERE description REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT notes FROM CalendarItem WHERE notes REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT structured_data FROM CalendarItem WHERE structured_data REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT local_structured_data FROM CalendarItem WHERE local_structured_data REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT display_name FROM Store WHERE display_name REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT address FROM Store WHERE address REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT first_name FROM Store WHERE first_name REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

UNION ALL

SELECT last_name FROM Store WHERE last_name REGEXP '(?i)\\b(?:p\\.?\\s*o\\.?\\s*box|post\\s+office\\s+box|ave\\.?|avenue|st\\.?|street|rd\\.?|road|blvd\\.?|boulevard|dr\\.?|drive|ln\\.?|lane|ct\\.?|court|pl\\.?|place|way|pkwy\\.?|parkway|cir\\.?|circle|terrace|hwy\\.?|highway|trl\\.?|trail|sq\\.?|square|pike|loop|run|walk|path|byp\\.?|bypass|(?:n|s|e|w|ne|nw|se|sw)\\b)\\b'

PII_Prompt: a US postal address is a street-level mailing location in the United States, commonly appearing as a street name and suffix (e.g., 'Market St') optionally with a street number (e.g., '1500 Market St'), unit, city/state, ZIP, or a PO Box (e.g., 'P.O. Box 123')