Question: I almost done witm my assignment, but i coudn't figure the last query out. here is what is rquired. (this assignment has to be done

I almost done witm my assignment, but i coudn't figure the last query out. here is what is rquired. (this assignment has to be done by pgadmin4)

Add country, salary column to city table and set yearly_salary to 78246.12 for cities in Canada. DEFAULT constraint must be used to add Canada as a default country for cities. [Use DEFAULT Constraint to default your country to Canada, that way you only have to write the countries for cities which are not in Canada, Hint : remember boston and new York are cities in US, rest all are in Canada, Use ALTER TABLE to add column and default constraint].

I almost done witm my assignment, but i coudn't figure the last

query out. here is what is rquired. (this assignment has to be

done by pgadmin4) Add country, salary column to city table and set

1. Answer the questions with respect to the table below users id gender city_id name John Sara Victor Jane age 25 20 31 27 OCC I 4 occupation id name Software Engineer Accountant Pharmachist Library Assistant 4 city id name Halifax Calgary Boston New York Toronto (a) Create the three tables with their SQL queries and paste the code in text format below. Make sure while creating the tables: [6+2+2] .Must have primary keys in all the tables .The attributes which can potentially be foreign keys must have NOT NULL Constraint. Gender attribute in users table should CHECK for 'M' or 'F

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!