This is an SQL Database I made for a Stardance website I created. This Database uses Microsoft Azure, which makes it more difficult to display. So I inserted the code here.
PLEASE READ TO THE END OF THE PAGE
ALL INFORMATION IN THIS DATABASE BELONGS TO
https://worldofoutlaws.com/sprintcars/historical-stats-sprint-cars/all-time-wins/ AND OTHER RESPECTIVE HOLDERS
How I made the Database
First, I created a Microsoft Azure SQL database and server. I used the credentials to connect to VS Code. This allowed me to create the SQL Database without leaving my VS Code workspace, allowing me to track my coding time with Wakatime. Secondly, I used the SQL commands:
CREATE TABLE sprintcars3 (
pos INT PRIMARY KEY,
driver VARCHAR(255) NOT NULL,
locatiom VARCHAR(255) NOT NULL,
wins INT NOT NULL
);
This creates the table, then the code inside of DB.sql inserts the data into said table. The code below is the code used to insert the data into the table, this data was also hand typed by me.
INSERT INTO sprintcars3 (pos, driver, location, wins)
VALUES (2, 'Sammy Swindell', 'Germantown, TN', 394),
(3, 'Donny Schatz', 'Fargo, ND', 317),
(4, 'Mark Kinser', 'Oolitic, IN', 203),
(5, 'Doug Wolfgang', 'Sioux Falls, SD', 140),
(6, 'David Gravel', 'Watertown, CT', 125),
(7, 'Danny Lasoski', 'Dover, MO', 122),
(8, 'Joey, Saldana', 'Brownsburg, IN', 105),
(9, 'Dave Blaney', 'Hartford, OH', 95),
(10, 'Brad Sweet', 'Grass Valley, CA', 93),
(11, 'Daryn Pittman', 'Owasso, OK', 86),
(12, 'Stevie Smith', 'New Oxford, PA', 84),
(13, 'Jac Haudenschild', 'Wooster, OH', 72),
(14, 'Bobby Davis JR.', 'Memphis, TN', 66),
(15, 'Craig Dollansky', 'Elk River, MN', 66),
(16, 'Carsons Macedo', 'Lemoore, CA', 61),
(17, 'Jason Meyers', 'Clovis, CA', 58),
(18, 'Jeff Swindell', 'Bartlett, TN', 51),
(19, 'Sheldon Haudenschild', 'Wooster, OH', 47),
(20, 'Logan Schuchart', 'Hanvier, PA', 45),
(21, 'Andy Hillenburg', 'Broken Arrow, OK', 42),
(22, 'Kyle Larson', 'Elk Grove, CA', 39),
(23, 'Shane Stewart', 'Bixby, OK', 36),
(24, 'Bobby Allen', 'Hanover, PA', 30),
(25, 'Kerry Madsen', 'ST. Marys, NSW, AUS', 30),
(26, 'Buddy Kofoid', 'Penngrove, CA', 28),
(27, 'Paul McMahan', 'Nashville, TN', 27),
(28, 'Time Shaffer', 'Aliquippa, PA', 27),
(29, 'Ron Shuman', 'Tempe, AZ', 24),
(30, 'Rico Abreu', 'ST. Helena, CA', 22),
(31, 'Time Kaeding', 'San Jose, CA', 21),
(32, 'Rick Ferkel', 'Green Springs, OH', 21),
(33, 'Gred Hodnet', 'Springs Grove, PA', 20),
(34, 'Lance Dewease', 'Fayetteville, PA', 20),
(35, 'Brad Doty', 'Millersburg, OH', 18),
(36, 'Kraig Kinser', 'Bloomington, IN', 17),
(37, 'Johnny Herrera', 'Albuquerque, NM', 17),
(38, 'Jason Sides', 'Bartlett, TN', 15),
(39, 'Brent Marks', 'Myserstown, PA', 15),
(40, 'Brooke Tatnell', 'Sans Souci, NSW, AUS', 13),
(41, 'Terry McCarl', 'Altoona, IA', 13),
(42, 'Time Green', 'San Joes, CA', 12),
(43, 'Tyler Walker', 'Los Angeles, CA', 12),
(44, 'Don Kreitz Jr.', 'Sinking Spring, PA', 12),
(45, 'Jason Johnson', 'Eunice, LA', 12),
(46, 'James, McFadden', 'Alice Springs, NT, AUS', 12),
(47, 'Dale Blaney', 'Hartford, OH', 12),
(48, 'Fred Rahmer', 'Salfirdville, PA', 11),
(49, 'Danny Smith', 'Chillicothe, OH', 10),
(50, 'Joe Gaerte', 'Rochester, IN', 10),
(51, 'Giovanni Scelzi', 'Fresno, CA', 10),
(52, 'Keith Kauffman', 'Mifflintown, PA', 9),
(53, 'Brent Kaeding', 'Campbell, CA', 9),
(54, 'Kenny Jacobs', 'Holmesville, OH', 9),
(55, 'Anthony Macri', 'Dillsburg, PA', 9),
(56, 'Jimmy Sills', 'Placerville, CA', 8),
(57, 'Cody Darrah', 'Red Lion, PA', 8),
(58, 'Aaron Reutzel', 'Clute, TX', 8),
(59, 'Jeff Shepard', 'Finksburg, MD', 7),
(60, 'Chad Kemenah', 'Findlay, OH', 7),
(61, 'Brian Brown', 'Grain Valley, MO', 7),
(62, 'Lee Osborne', 'Spencerport, NY', 6),
(63, 'Steve Smith', 'New Oxford, PA', 6),
(64, 'Lynn Paxton', 'Mechanicsburg, PA', 6),
(65, 'Gary Wright', 'Hooks, TX', 6),
(66, 'Christopher Bell', 'Hooks, TX', 6),
(67, 'Spencer Bayston', 'Lebanon, IN', 6),
(68, 'Tyler Courtney', 'Indianaoplis, IN', 6),
(69, 'Danny Wood', 'Norman, OK', 5),
(70, 'Johnny Anderson', 'Palmdale, CA', 5),
(71, 'Brian Paulus', 'Mechanicsburg, PA', 5),
(72, 'Brad Furr', 'Pleasanton, CA', 5),
(73, 'Danny Dietrich', 'Gettysburg, PA', 5),
(74, 'Jacob Allen', 'Hanover, PA', 5),
(75, 'Dub May', 'Hobbs, NM', 4),
(76, 'Jack Hewitt', 'Troy,OH', 4),
(77, 'Ian Madsen', 'ST. Marys, NSW, AUS', 4),
(78, 'Bill Balog', 'North Pole, AK', 4),
(79, 'Shane Carson', 'Oklahoma City, OK', 3),
(80, 'Lee James', 'Northridge, CA', 3),
(81, 'Mark Dobmeier', 'Grand Forks, ND', 3),
(82, 'Jasons Solwold', 'Burlington, WA', 3),
(83, 'Tony Stewart', 'Columbus, IN', 3),
(84, 'Cris Eash', 'Woodbine, MD', 3),
(85, 'Corey Day', 'Clovis, CA', 3),
(86, 'Lee Brewer', 'Memphis, TN', 2),
(87, ' Lealand McSpadden', 'Tempe, AZ', 2),
(88, 'Darrell Hanestad', 'San Lorenzo, CA', 2),
(89, 'Kramer Williamson', 'Palmyra, PA', 2),
(90, 'Rickey Hood', 'Memphis TN', 2),
(91, 'Smokey, Snellbaker', 'Dover, PA', 2),
(92, 'Frankie Kerr', 'Fremont, OH', 2),
(93, 'Billy Pauch Sr.', 'Frenchtown, NJ', 2),
(94, 'P.J. Chesson', 'Far Hills, NJ', 2),
(95, 'Randy Hannagan', 'San Jose, CA', 2),
(96, 'Greg Wilson', 'Benton Ridge, OH', 2),
(97, 'Chad Layton', 'Harrisbirg, PA', 2),
(98, 'Cory Eliason', 'Visalia, CA', 2),
(99, 'Shane Golobic', 'Fremont, CA', 2),
(100, 'Doug Esh', 'Lancaster, PA', 2),
(101, 'Parker Price-Miller', 'Kokomo, IN', 2),
(102, 'Brock Zearfoss', 'Jonestown, PA', 2),
(103, 'Brady Bacon', 'Broken Arrow, OK', 2),
(104, 'Ed Lynch Jr.', 'Apollo, PA', 1),
(105, 'Randy Ford', 'Elmore, OH', 1),
(106, 'Jimmy Boyd', 'Oakland, CA', 1),
(107, 'Johnny Beaber', 'Gibsonburg, OH', 1),
(108, 'Bentley Warrent', 'Kennebunkerport, ME', 1),
(109, 'Jim Edwards', 'Phoenix, AZ', 1),
(110, 'Buster Venard', 'Tustin, CA', 1),
(111, 'Rick Goudy', 'Cerritos, CA', 1),
(112, 'Allen Klinger', 'Mechanicsburg, PA', 1),
(113, 'Larry Gates', 'St. Joseph, IN', 1),
(114, 'Dean Thompson', 'Carson, CA', 1),
(115, 'Bill Stief', 'Essingtion, PA', 1),
(116, 'Ken Schrader', 'Festus, MO', 1),
(117, 'Terry Gray', 'Bartlett, TN', 1),
(118, 'Gary Scott', 'Holts Summit, MO', 1),
(119, 'Tim Gee', 'Whithorse, YT, CAN', 1),
(120, 'Ronnie Daniels', 'Moncks Corner, SC', 1),
(121, 'Rick Ungar', 'Belpree, OH', 1),
(122, 'Rocky Hodges', 'Des Moines, IA', 1),
(123, 'Dave Bradway Jr.', 'Roseville, CA', 1),
(124, 'Chuck Miller', 'Morgan Hill, CA', 1),
(125, 'Craig Keel', 'Weedsport, NY', 1),
(126, 'Todd Shaffer', 'Millertown, PA', 1),
(127, 'Jerry Stone', 'Tulsa, OK', 1),
(128, 'Joey Allen', 'Hanover, PA', 1),
(129, 'Bill Brian Jr.', 'Hanover, PA', 1),
(130, 'Kelly Kinser', 'Bloomington, IN', 1),
(140, 'Kevin Gobrecht', 'New Oxford, PA', 1),
(141, 'Sam Hafertepe Jr.', 'Sunnyvale, TX', 1),
(142, 'Jason Statler', 'Grass Valley, CA', 1),
(143, 'Blake Feese', 'Saybrook, IL', 1),
(144, 'Mark Smith', 'Sunbury, PA', 1),
(145, 'Erin Crocker-Evernham', 'Wilbraham, MA', 1),
(146, 'Dean Jacobs', 'Wooster, OH', 1),
(147, 'Kevin Swindell', 'Germantown, TN', 1),
(148, 'Brian Leppo', 'New Oxford, PA', 1),
(149, 'Tony Bruce Jr.', 'Liberal, KS', 1),
(150, 'Sean Becker', 'Oroville, CA', 1),
(151, 'Travis Jacobsen', 'Lake Stevens, WA', 1),
(152, 'Lucus Wolfe', 'Mechanicsburg, PA', 1),
(153, 'Roger Crockett', 'Medford, OR', 1),
(154, 'Jonathan Allard', 'Chico, CA', 1),
(155, 'Ryan Smith', 'Kunkletown, PA', 1),
(157, 'Dusty Zomer', 'Brandon, SD', 1),
(158, 'Stewart Friesen', 'Niagra, ONT, CAN', 1),
(159, 'Kyle Hirst', 'Paradise, CA', 1),
(160, 'Freddie Rahmer', 'Salfordville, PA', 1),
(161, 'Carson Short', 'Marion, IL', 1),
(162, 'Zeb Wise', 'Angola, IN', 1),
(163, 'T.J. Stutts', 'Liverpool, PA', 1),
(164, 'Ryan Timms', 'Oklahoma City, OK', 1),
(165, 'Chase Dietz', 'York, PA', 1),
(156, 'Kasey Kahne', 'Enumclaw, WA', 1);
Constraint definitions and why I used them.
CREATE TABLE sprintcars3 (
pos INT PRIMARY KEY,
driver VARCHAR(255) NOT NULL,
locatiom VARCHAR(255) NOT NULL,
wins INT NOT NULL
);
This multi-lined code creates a table within the SQL Database. CREATE TABLE ‘sprintcars3’ defines that I want to create a table named ‘sprintcars3’. ‘pos INT PRIMARY KEY’ is the first column that is going to be created in the table. ‘pos’ is the name of the column, which in this case means position. ‘INT’ is the data type; in this case, ‘INT’ means integer. ‘PRIMARY KEY’ specifies that any integer that is inserted into the table is unique and cannot be empty. In the third line, ‘driver’ is the name of the column, and VARCHAR(255) is the data type. In this case, the data type for the column will be a string, and (255) specifies how many characters long the string can be. Lastly, the constraint ‘NOT NULL’ makes sure the data in that column cannot be empty, as it has to have data. Otherwise, inserting data into that column will fail.