Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Summary In this assignment, you will set up your PostgreSQL database, reverse-engineer a logical schema from some SQL DDL statements, and write queries to retrieve
Summary In this assignment, you will set up your PostgreSQL database, reverse-engineer a logical schema from some SQL DDL statements, and write queries to retrieve information. This homework will use the data in the SQL file charity.sql. Run this file as an SQL script in to import the data (it will create a database called 'charity'). Submit the final results of your assignment as a single PDF file; this is probably easiest to do by copying SQL queries and results into a Word or LibreOffice document. Part 2 (30 points): Data Model Draw a logical data model in entity-relationship syntax for the following tables as defined by their CREATE TABLE statements: CREATE TABLE donor donor_id SERIAL PRIMARY KEY, donor_name VARCHAR (500) NOT NULL, donor email VARCHAR(200) NOT NULL, donor_address VARCHAR (200) NOT NULL, donor city VARCHAR(100) NOT NULL, donor state VARCHAR (20) NOT NULL, donor_zip VARCHAR(10) NOT NULL CREATE TABLE fund ( fund id SERIAL PRIMARY KEY, fund_name VARCHAR(50) NOT NULL ); CREATE TABLE gift ( gift id SERIAL PRIMARY KEY, donor id INTEGER NOT NULL REFERENCES donor (donor id), gift_date DATE NOT NULL ) CREATE TABLE gift fund allocation ( gf alloc id SERIAL PRIMARY KEY, gift id INTEGER NOT NULL REFERENCES gift (gift id), fund id INTEGER NOT NULL REFERENCES fund (fund id), amount DECIMAL NOT NULL You must draw the model yourself. Do not submit the output of a tool that reverse-engineers the data model
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started