Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago