-
Notifications
You must be signed in to change notification settings - Fork 5
/
agenda.txt
106 lines (56 loc) · 1.05 KB
/
agenda.txt
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
1. REST Architecture
2. express.js
books and authors
REST ----> Http protocol.
1. stateless
2. resource resolution
3. status codes -- 200, 400, 500, 300, 100 ..
4. methods
1. getAllBooks() <---> /books
2. getBookById(id) <----> /books/:id
3. getAllAuthors() <----> /authors
4. getAuthorById(id) <-----> /authors/:id
6. getAuthorByBookId(id) <----> books/:id/author
{
name: 'chacha chaudhary',
id: 1
author: {
}
}
{
name: 'pritam',
id: 6,
books: [
{
},
{
}
]
}
Homework
1. remove duplicates from getAllAuthors
2. apply filter to get book by name
3. update a book ---> PUT
queryParameters
app.use(filter);
- username, password in headers
- filters
make use of queryParameters
1. book.name=shiva triology&book.ratings=5
-- joins in sequelize
-- MVC -> Model View Controller
-- hasOne
-- hasMany
-- belongsTo
-- belongsToMany
orders
user_id
user
id
user hasMany orders
orders belongsTo users
Males
id name married_to
2
Females
id name