Skip to content

Instantly share code, notes, and snippets.

@SuperNascher
Last active November 28, 2017 09:32
Show Gist options
  • Save SuperNascher/785c0f61b9797f9c223b64643f3460a5 to your computer and use it in GitHub Desktop.
Save SuperNascher/785c0f61b9797f9c223b64643f3460a5 to your computer and use it in GitHub Desktop.
TU BS - RDB1 Wintersemster 2017/2018
-- RDB1 6. Aufgabenblatt
group: RDB1
-- Aufgabe 6.1
R = {
a:number
42
10
5
20
25
}
-- Solution 6.1: π a (R) \ π b ( σ a < b (R x ρ b←a (R)))
-- Aufgaben 6.2
City = {
name:string, country_code:string, city_population:number
"Wolfsburg", "DE", 124045
"Braunschweig", "DE" 251.364
"Berlin", "DE", 3520031
}
Country = {
code:string, name:string, continent:string, surface_area:number, indep_year:number, gov_form:string, captial:string
"GER", "Germany", "Europe", 357376, 1949, "Republic", "Berlin"
}
Language = {
lang_id:number, code:string, name:string, percent:number, official:boolean
1, "GER", "Deutsch", 55, true
}
-- Aufgabe 6.3
Student = {
ID:number, name:string, semester:number, faculty:string
1, "Bulbasaur", 3, "A"
2, "Ivysaur", 4, "A"
3, "Venusaur", 1, "A"
4, "Charmander", 3, "B"
5, "Metapod", 7, "C"
6, "Rattata", 5, "A"
7, "Nidoking", 6, "C"
8, "Vulpix", 7, "B"
9, "Slowbro", 9, "C"
10, "Mewtoo", 10, "D"
}
Team = {
ID1:number, ID2:number, homeworkID:number, score:number
1, 4, 1, 15
4, 1, 1, 15
2, 6, 1, 5
6, 2, 1, 5
5, 8, 1, 20
8, 5, 1, 20
9, 7, 1, 12
7, 9, 1, 12
}
Homework = {
ID:number, description:string, max_score:number
1, "Starting HA", 20
2, "Its the final countdown", 30
}
Likes = {
ID1:number, ID2:number
1, 4
4, 1
6, 1
8, 5
}
-- Aufgabe 6.4
Answer = {
orginal:number, answer:number
1, 2
1, 3
6, 7
6, 8
6, 9
}
Tweet = {
id:number, text:string, date:date, time:string, user:number
1, "I'm tired", 2017-10-11, 1500, 1
2, "Time to drink coffee!", 2017-10-11, 1502, 2
3, "You must go to bed earlier.", 2017-10-11, 1505, 3
4, "I'm not using hashtags!", 2017-10-11, 1606, 3
5, "Time to drink the Coffee again!", 2017-10-11, 1800, 3
6, "I've finished my work, Yeah.", 2017-10-11, 2000, 2
7, "Party!", 2017-10-11, 2001, 3
8, "Yeah!", 2017-10-11, 2003, 1
9, "Hurray!", 2017-10-11, 2006, 4
}
User = {
id:number, name:string, age:number, country:string
1, "Bulbasaur", 10, "DE"
2, "Ivysaurm", 12, "DE"
3, "Charmander", 13, "GB"
4, "Ditto", 20, "NL"
}
Hashtag = {
id:number, name:string
1, "GoodMorning"
2, "Coffee"
}
Hashtag_used = {
tweet:number, hashtag:number
1, 1
2, 2
5, 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment