Question: Instructions: Using the guidance and instructions given in the module download and install the appropriate version of PostgreSQL for your system. Familiarize yourself with the
Instructions:
Using the guidance and instructions given in the module download and install the appropriate version of PostgreSQL for your system.
Familiarize yourself with the pgAdmin web interface.
Create a database called Company.
Replicate the final database schema for the Company database example as shown in class using PostgreSQL. Use the schema and data given here to guide you and complete each step given remember you will need to add the foreign key constraint to Employees after creating the Department table, as seen in class
Make sure you include all keys as shown in the table definitions in lectures, but do not include extra constraints eg domains, etc. created just as didactical examples in class.
Please note that the schema listed here has some different field names than the ones used in the lectures. Please use the names provided here to define your tables as we may use this updated schema in other assignments make sure you also save your completed work for later
Once the database schema is created, transform the statements given below to DDL SQL commands and execute them in PostgreSQL fixing any issues you may encounter.
Follow the order given for the commands as it is important due to database constraints.
Do not forget to save the database definition since you may be using it again later on
Hint: Using certain applications, such as Microsoft Excel, could greatly help you to speed up this process. Check the additional resources section for a video explaining how this is done.
Finally, proceed to answer the assignment's related question.
Step :
EMPLOYEE fname minit, lname ssn bdate, address, sex, salary, superssn, dno
Add the following records to the EMPLOYEE table:
JamesEBorg,NOV Stone, Houston, TXMnull,null
FranklinTWong,DEC Voss, Houston, TXMnull
JenniferSWallace,JUN Berry, Bellaire, TXFnull
JaredDJames,OCT Peachtree, Atlanta, GAMnull,null
AlexDFreed,OCT Pillsbury, Milwaukee, WIMnull,null
JohnCJames,JUN Bloomington, Sacramento, CAMnull,null
Step :
DEPARTMENT dname dnumber, mgrssn mgrstartdate
Add the following records to the DEPARTMENT table:
ResearchMAY
AdministrationJAN
HeadquartersJUN
SoftwareMAY
HardwareMAY
SalesJAN
Step :
Update the following records in the EMPLOYEE table:
Update dnumber to the employee with ssn
Update dnumber to the employee with ssn
Update dnumber to the employee with ssn
Update dnumber to the employee with ssn
Update dnumber to the employee with ssn
Update dnumber to the employee with ssn
Step :
Add the following employees in the EMPLOYEE table:
JohnBSmith,Jan Fondren, Houston, TXM
AliciaJZelaya,JUL Castle, Spring, TXF
RameshKNarayan,SEP Fire Oak, Humble, TXM
JoyceAEnglish,JUL Rice Oak, Houston, TXF
AhmadVJabbar,MAR Dallas, Houston, TXM
JonCJones,NOV Allgood, Atlanta, GAM
DonTSmith,NOV Main Road, Atlanta, GAM
Justinnull,Mark,JAN May, Atlanta, GAM
BradCKnight,FEB Main St Atlanta, GAM
EvanEWallis,JAN Pelham, Milwaukee, WIMnull,
JoshUZell,MAY McGrady, Milwaukee, WIM
AndyCVile,JUN Jordan, Milwaukee, WIM
TomGBrand,DEC Third St Milwaukee, WIM
JennyFVos,NOV Mayberry, Milwaukee, WIF
ChrisACarter,MAR Jordan, Milwaukee, WIF
KimCGrace,OCT Mills Ave, Sacramento, CAFnull,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
