-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_planets.sql
More file actions
29 lines (25 loc) · 1.65 KB
/
create_planets.sql
File metadata and controls
29 lines (25 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* @create_planets.sql */
/* Planets in the Solar System */
CREATE TABLE IF NOT EXISTS planets (ID INTEGER PRIMARY KEY,
name TEXT,
equatorial_diameter INTEGER, -- in km
mass INTEGER, -- relative to Earth
semi_major_axis INTEGER, -- in unit of AU
orbital_period INTEGER, -- in unit of years
inclination_to_suns_equator INTEGER, -- in degrees
orbital_eccentricity INTEGER,
rotation_period INTEGER, -- in days
confirmed_moons INTEGER,
axial_tilt INTEGER, -- in degrees
rings TEXT,
atmosphere TEXT, -- composition of atmosphere
mean_temp INTEGER, -- Mean surface temperature in degrees Celsius
gravity NUMERIC(4,2)); -- in N/kg
INSERT INTO planets VALUES (1, 'Mercury', 4878, 0.06, 0.39, 0.24, 3.38, 0.206, 58.64, 0, 0.04, 'no', 'minimal', 167, 3.7);
INSERT INTO planets VALUES (2, 'Venus', 12100, 0.82, 0.72, 0.62, 3.86, 0.007, -243.02, 0, 177.36, 'no', 'CO2, N2', 464, 8.87);
INSERT INTO planets VALUES (3, 'Earth', 12756, 1, 1, 1, 7.25, 0.017, 1, 1, 23.44, 'no', 'N2, O2, Ar', 15, 9.80);
INSERT INTO planets VALUES (4, 'Mars', 6794, 0.11, 1.52, 1.88, 5.65, 0.093, 1.03, 2, 25.19, 'no', 'CO2, N2, Ar', -65, 3.71);
INSERT INTO planets VALUES (5, 'Jupiter', 142800, 317.8, 5.2, 11.86, 6.09, 0.048, 0.41, 79, 3.13, 'yes', 'H2, He', -110, 24.79);
INSERT INTO planets VALUES (6, 'Saturn', 120000, 95.17, 9.54, 29.46, 5.51, 0.054, 0.43, 82, 26.73, 'yes', 'H2, He', -140, 10.44);
INSERT INTO planets VALUES (7, 'Uranus', 52400, 14.56, 19.22, 84.01, 6.48, 0.047, -0.72, 27, 97.77, 'yes', 'H2, He, CH4', -195, 8.87);
INSERT INTO planets VALUES (8, 'Neptune', 48400, 17.24, 30.06, 164.8, 6.43, 0.009, 0.67, 14, 28.32, 'yes', 'H2, He, CH4', -200, 11.15);