create database presidents;

use presidents;

create table presidentsData (
    Presidential_num int primary key auto_increment,
    Last_Name varchar(20),
    First_Name varchar(20),
    Party varchar(50),
    Nickname varchar(50),
    Year_of_Birth varchar(5),
    Year_of_Death varchar(5),
    Term varchar(5),
    Decade varchar(5),
    Other_Positions varchar(255),
    Major_Accomplishments varchar(255),
    Wars_During_Office varchar(80)
);

create index idx_Last_Name ON presidentsData(Last_Name);
create index idx_Party ON presidentsData(Party);

Describe presidentsData;

insert into presidentsData
(Last_Name, First_Name, Party, Nickname, Year_of_Birth, Year_of_Death, Term, Decade, Other_Positions, Major_Accomplishments, Wars_During_Office)
value
( 'Washington', 'George ', 'nonpartisan ', 'Father of His Country', '1732', '1799', '2', '1789', 'Military Leader', 'Establishing the cabinet', 'American Revolutionary'),
( 'Adams', 'John ', 'Federalist', 'His Rotundity', '1735', '1826', '1', '1797', 'political philosopher', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Jefferson', 'Thomas  ', 'Republican Party', 'Long Tom', '1743', '1826', '2', '1801', 'Congressman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Madison', 'James  ', 'Republican Party', 'Little Jemmy', '1751', '1836', '2', '1809', 'State legislator', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Monroe', 'James  ', 'Republican Party', ' Last Cocked Hat', '1758', '1831', '2', '1817', '	US Senator', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Adams', 'John Quincy  ', 'Republican Party', 'Old Man Eloquent', '1767', '1848', '1', '1825', 'State legislator', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Jackson', 'Andrew  ', 'Democratic Party', 'Jackass', '1767', '1845', '2', '1829', ' US Senator', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Buren', 'Martin ', 'Democratic Party', 'Blue Whiskey Van ', '1782', '1862', '1', '1837', 'US Senator	', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Harrison', 'William  ', 'Whig Party', 'Old Granny', '1773', '1841', '1', '1841', 'Territorial governor', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Tyler', 'John ', 'Whig Party', 'His Accidency', '1790', '1862', '0', '1841', 'US. Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Polk', 'James  ', 'Democratic Party', 'Young Hickory', '1795', '1849', '1', '1845', 'US Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Taylor', 'Zachary ', 'Whig Party', 'Old Rough and Ready', '1784', '1850', '1', '1849', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Fillmore', 'Millard ', 'Whig Party', 'Last of the Whigs', '1800', '1874', '0', '1850', 'US Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Pierce', 'Franklin  ', 'Democratic Party', 'Purse', '1804', '1869', '1', '1853', 'US Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Buchanan', 'James  ', 'Democratic Party', 'Old Buck', '1791', '1868', '1', '1857', 'US Senator', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Lincoln', 'Abraham  ', 'Republican Party', 'Abe', '1822', '1865', '2', '1861', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Johnson', 'Andrew  ', 'Democratic Party', 'Sir Veto', '1808', '1875', '0', '1865', 'State governor', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Grant', 'Ulysses  ', 'Republican Party', 'Butcher', '1822', '1885', '2', '1869', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Hayes', 'Rutherford  ', 'Republican Party', 'Dark Horse President', '1822', '1893', '1', '1877', 'US Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Garfield', 'James  ', 'Republican Party', 'Canal Boy', '1831', '1881', '1', '1881', 'Ordained minister', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Arthur', 'Chester  ', 'Republican Party', 'Chet', '1829', '1886', '0', '1881', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Cleveland', 'Grover  ', 'Democratic Party', 'Big Steve', '1837', '1908', '1', '1885', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Harrison', 'Benjamin  ', 'Republican Party', 'Human Iceberg', '1833', '1901', '1', '1889', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Cleveland', 'Grover ', 'Democratic Party', 'Big Steve', '1837', '1908', '1', '1893', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'McKinley', 'William  ', 'Republican Party', 'Major', '1843', '1901', '2', '1897', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Roosevelt', 'Theodore  ', 'Republican Party', 'Teddy', '1858', '1919', '2', '1901', 'policeman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Taft', 'William  ', 'Republican Party', 'Big Bill', '1857', '1930', '1', '1909', 'dean', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Wilson', 'Woodrow  ', 'Democratic Party', 'Phrasemaker', '1856', '1924', '2', '1913', 'Academic', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Harding', 'Warren  ', 'Republican Party', 'Wobbly Warren', '1865', '1923', '1', '1921', 'Journalist', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Coolidge', 'Calvin  ', 'Republican Party', 'Cal', '1872', '1933', '1', '1923', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Hoover', 'Herbert ', 'Republican Party', 'Chief', '1884', '1972', '1', '1929', 'Businessman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Roosevelt', 'Franklin ', 'Democratic Party', 'FDR', '1882', '1945', '4', '1933', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Truman', 'Harry  ', 'Democratic Party', 'Haberdasher Harry', '1884', '1972', '2', '1945', 'Farmer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Eisenhower', 'Dwight  ', 'Republican Party', 'Ike', '1890', '1969', '2', '1953', 'Military officer,', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Kennedy', 'John  ', 'Democratic Party', 'American Erlander', '1917', '1963', '1', '1961', 'Journalist', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Johnson', 'Lyndon  ', 'Democratic Party', 'Bull Johnson', '1908', '1973', '2', '1963', 'Teacher', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Nixon', 'Richard  ', 'Republican Party', 'Tricky Dick', '1913', '1994', '2', '1969', 'US Representative', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Ford', 'Gerald  ', 'Republican Party', 'Jerry', '1913', '2006', '0', '1974', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Carter', 'Jimmy  ', 'Democratic Party', 'Jimmy', '1924', '2024', '1', '1977', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Reagan', 'Ronald  ', 'Republican Party', 'Dutch', '1911', '2004', '2', '1981', 'Military', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Bush', 'George H.W ', 'Republican Party', 'Papa Bush', '1924', '2018', '1', '1989', 'Businessman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Clinton', 'Bill  ', 'Democratic Party', 'Bubba', '1946', 'Havent', '2', '1993', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Bush', 'George W ', 'Republican Party', 'Dubya', '1946', 'Havent', '2', '2001', 'Businessman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Obama', 'Barack  ', 'Democratic Party', 'Barry O’Bomber', '1961', 'Havent', '2', '2009', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Trump', 'Donald  ', 'Republican Party', 'President Snowflake', '1946', 'Havent', '1', '2017', 'Businessman', 'The Convention of Montefontaine', 'French Revolutionary')
( 'Biden', 'Joe  ', 'Democratic Party', 'Sleepy Joe', '1942', 'Havent', '1', '2021', 'Lawyer', 'The Convention of Montefontaine', 'French Revolutionary')



;

select * from presidentsData;


drop database presidents;