2018-05-08

May 9 In-Class Exercise Thread .

Post your solutions to the May ( In-Class Exercise to this thread.

Chris

Post your solutions to the May ( In-Class Exercise to this thread. Chris

-- May 9 In-Class Exercise Thread

Dimensional tables: PoliticalParty (name, age, district, occupation, income, education, party affiliation, sex, marital status, year DistrictData (name, age, zip-code, party-affiliation, sex, district)

Fact table: create a table with the following info:
select political, district, age from PoliticalPary table and select corresponding fields from DistritData to create a fact table: This table can be used to show who lives in San Jose (or xxx), who voted for a Democratic president with different age levels.

(Edited: 2018-05-09)
Dimensional tables: PoliticalParty (name, age, district, occupation, income, education, party affiliation, sex, marital status, year DistrictData (name, age, zip-code, party-affiliation, sex, district) Fact table: create a table with the following info: select political, district, age from PoliticalPary table and select corresponding fields from DistritData to create a fact table: This table can be used to show who lives in San Jose (or xxx), who voted for a Democratic president with different age levels.

-- May 9 In-Class Exercise Thread

Fact Table: People(name, age, address, occupation)

Address(street, city, state)

Name(first, last)

Occupation(industry, salary)

(Edited: 2018-05-09)
Fact Table: People(name, age, address, occupation) Address(street, city, state) Name(first, last) Occupation(industry, salary)

-- May 9 In-Class Exercise Thread

Fact Table: People(name, age, gender, race, location)

Dependent Attribute: Location

Dimension tables: Race(type), Location(name, city, state), Age(day, month, year), Gender(type)

-Casey

(Edited: 2018-05-09)
Fact Table: People(name, age, gender, race, location) Dependent Attribute: Location Dimension tables: Race(type), Location(name, city, state), Age(day, month, year), Gender(type) -Casey

-- May 9 In-Class Exercise Thread

Census(socialNo, area_code, date, salary)

Person(socialNo, first, last, dob, gender) Area(area_code, population, county) Days(day, week, month, year)

Dependent Attribute: salary

Census(socialNo, area_code, date, salary) Person(socialNo, first, last, dob, gender) Area(area_code, population, county) Days(day, week, month, year) Dependent Attribute: salary

-- May 9 In-Class Exercise Thread

Fact: Person(name, city, poliParty) Dimensions: --PersonalInfo(varchar name, varchar race, int birthMonth, int birthDay, int birthYear, varchar occupation, varchar maritalStatus) --Address(int num, varchar street, varchar city, varchar state, varchar zip) --CensusInfo(int timesInCensus, varchar poliParty) dependentAttribute = varchar socialSecurityNum

This could be used for district mapping, counting people for taxation, and conducting surveys.

(Edited: 2018-05-09)
Fact: Person(name, city, poliParty) Dimensions: --PersonalInfo(varchar name, varchar race, int birthMonth, int birthDay, int birthYear, varchar occupation, varchar maritalStatus) --Address(int num, varchar street, varchar city, varchar state, varchar zip) --CensusInfo(int timesInCensus, varchar poliParty) dependentAttribute = varchar socialSecurityNum This could be used for district mapping, counting people for taxation, and conducting surveys.

-- May 9 In-Class Exercise Thread

Star Schema - Fact Table: Resident(Location, Occupation, SocialSec)<br /> Attributes per resident: gender, residentType, age<br /><br /> Possible Dimension tables:<br /> Location(state, county, region, lowerAddr)<br /> Occupation(name, type)<br /> SocialSec(id, locationIssued)

(Edited: 2018-05-09)
Star Schema - Fact Table: Resident(Location, Occupation, SocialSec)<br /> Attributes per resident: gender, residentType, age<br /><br /> Possible Dimension tables:<br /> Location(state, county, region, lowerAddr)<br /> Occupation(name, type)<br /> SocialSec(id, locationIssued)

-- May 9 In-Class Exercise Thread

Fact Table: NationalData(person, state, business)

Dimension Tables: Person(SSN, Name, Age, Race, Religion, State, County, City, partyAffilitaion, Working)

State(Population, Income, numRepresentatives, Births, Deaths)

Business(earnings, industry, numEmployees, state)

Fact Table: NationalData(person, state, business) Dimension Tables: Person(SSN, Name, Age, Race, Religion, State, County, City, partyAffilitaion, Working) State(Population, Income, numRepresentatives, Births, Deaths) Business(earnings, industry, numEmployees, state)

-- May 9 In-Class Exercise Thread

Person(SSN, firstname, lastname, occupation, age, city) Occupation(title, salary, industry) Age(years) Dependent attribute = city

Person(SSN, firstname, lastname, occupation, age, city) Occupation(title, salary, industry) Age(years) Dependent attribute = city

-- May 9 In-Class Exercise Thread

Fact table: People(name string, age int, occupation string, address string)

Occupation(industry string, salary double)

County(name string, county string, population string, area string, gdp double)

Name(first string, last string)

Fact table: People(name string, age int, occupation string, address string) Occupation(industry string, salary double) County(name string, county string, population string, area string, gdp double) Name(first string, last string)
[ Next ]
X