Information Technology  >  Quiz  >  INFO_2312_Assignment_2.doc.pdf (All)

INFO_2312_Assignment_2.doc.pdf

Document Content and Description Below

Answer the questions with respect to the table below. users id name age gender occ_id city_id 1 John 25 M 1 3 2 Sara 20 F 3 4 3 Victor 31 M 2 5 4 Jane 27 F 1 3 occupation id name 1 Software E ... ngineer 2 Accountant 3 Pharmacist 4 Library Assistant City id name 1 Halifax 2 Calgary 3 Boston 4 New York 5 Toronto This study source was downloaded by 100000840858457 from CourseHero.com on 07-07-2022 04:19:31 GMT -05:00 https://www.coursehero.com/file/65604756/INFO-2312-Assignment-2doc/(a) Create the three tables with their SQL queries and paste the code in text format below. Make sure while creating the tables: [5+2.5+2.5]  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’. Users Table Query : CREATE TABLE users ( id int not null primary key, name varchar(50), age int, occ_id int not null, city_id int not null, gender TEXT CHECK (gender='M'OR (gender= 'F')) ); Occupation Table Query : CREATE TABLE occupation ( id serial PRIMARY KEY, name varchar(100) ); City Table Query : CREATE TABLE City ( id serial PRIMARY KEY, name varchar(50) ); [Show More]

Last updated: 3 years ago

Preview 1 out of 4 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of INFO_2312_Assignment_2.doc.pdf document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$7.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

142
0

Document information


Connected school, study & course


About the document


Uploaded On

Aug 04, 2022

Number of pages

4

Written in

All

Seller


Profile illustration for CourseWorks,Inc
CourseWorks,Inc

Member since 3 years

9 Documents Sold

Reviews Received
2
0
0
0
0
Additional information

This document has been written for:

Uploaded

Aug 04, 2022

Downloads

 0

Views

 142

Document Keyword Tags

More From CourseWorks,Inc

View all CourseWorks,Inc's documents »

Recommended For You

Get more on Quiz »

$7.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·