-
Notifications
You must be signed in to change notification settings - Fork 3
rizan_ibrahim-w1-database #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
rizan_ibrahim-w1-database #7
Conversation
yunchen4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Rizan,
I am Chen and will review your assignments for the database module.
The assignment for week 1 has one point to rework. I have made it explicit. Otherwise it looks very good. I also left some suggestions.
Please ping me on Slack when you finish the rework, or when you have any database questions! 🙂
| invite_no int auto_increment primary key, | ||
| invite_name varchar(100), | ||
| invite_by varchar(100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: should be invitee_... (you don't need to change this)
| create table room ( | ||
| room_no int auto_increment primary key, | ||
| room_name varchar (100), | ||
| floor_no int | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Usually floor number is not a big number. If you want to decrease the size of your table, you can use tinyint for floor_number.
Tiny int only takes 1 byte and int will take 4 bytes to store (doc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for ur comment I didn't know about this information, and i will consider it.
| /* create invite table */ | ||
| create table invitee( | ||
| invite_no int auto_increment primary key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is very nice that you use AUTO_INCREMENT and PRIMARY KEY ! 👏
| meeting_title varchar(200), | ||
| starting_time DATETIME, | ||
| ending_time DATETIME, | ||
| room_no int, foreign key (room_no) references room (room_no) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of foreign key!
|
|
||
| const queries = [ | ||
| "select name from country where Population > 8000000", | ||
| 'select name from country where name like " % land) % "', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'select name from country where name like " % land) % "'
Needs rework: do you think the name iceland will be captured by this query?
yunchen4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Rizan,
Your changes are correct but not complete. Please check my newest comment.
Let me know if you have any questions!
| const queries = [ | ||
| "select name from country where Population > 8000000", | ||
| 'select name from country where name like " % land) % "', | ||
| 'select name from country where name like " %land) % "', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs rework: Please notice you use two %. Before the second % you have a ) and a space. If a country has name iceland there is no space and ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my bad u are right i thought i fixed sorry and thanks for checking
yunchen4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
No description provided.