Post your solutions to the May ( In-Class Exercise to this thread.
Chris
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.
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, 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)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
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)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)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)
Person(SSN, firstname, lastname, occupation, age, city) Occupation(title, salary, industry) Age(years) Dependent attribute = city
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)