Skip to content

Conversation

@rizan-ibrahim
Copy link

No description provided.

@rizan-ibrahim rizan-ibrahim changed the title assingnment solved rizan_ibrahim-w1-database May 22, 2025
@yunchen4 yunchen4 self-assigned this May 24, 2025
Copy link

@yunchen4 yunchen4 left a 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! 🙂

Comment on lines 17 to 19
invite_no int auto_increment primary key,
invite_name varchar(100),
invite_by varchar(100)

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)

Comment on lines 24 to 28
create table room (
room_no int auto_increment primary key,
room_name varchar (100),
floor_no int
);

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).

Copy link
Author

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,

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)

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) % "',

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?

Copy link

@yunchen4 yunchen4 left a 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) % "',

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 ).

Copy link
Author

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

Copy link

@yunchen4 yunchen4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants