Hi I need someone urgently to fix my postgreSql problem. I am working on a test project fro a book pool database where users can register to borrow book or be a book source. Users who borrow pay by credit card and book source get paid by bank transfer into their bank account.
Please see attached documents for details;
I have an insert script to insert test data for my postgresql database but each time I run the script, I always run into the error message that says
'insert or update on table " table_name" violates foreign key constraint."
my friend told me to Start by populating or updating the lower end of the dependency (referenced table , foreign key source) and work my way in
I tried this suggestion but i still do not get it. I still run into this error
So I need someone to fix this problem. I will provide my create Table script and my ERD to enable you understand where am coming from.
Your Job is to write script Insert or update tables with sizable amount of valid test data and provide your sample sql script for the following :
1. Simple SELECTs on single tables
2. Select a subset of the fields in a table.
3.Join at least two tables together using a WHERE clause, an ON clause or some form of JOIN clause (e.g., INNER JOIN, OUTER JOIN, NATURAL JOIN)
Sort results, ascending and descending.
4. Use functions.
5. Use a GROUP clause to group your data
6. Use COUNT, AVERAGE or other group-oriented commands in your grouped data
7. Write a query to join at least three tables using commands such as WHERE, UNION and JOIN.
8. Write the same join as a sub-query (e.g., SELECT x WHERE y IN (SELECY yy FROM z))
9. Re-format data using functions or casting (e.g., to provide a different data format, to convert the case of some text, or to format numbers as currency)
Use a calculation to create a named generated field using AS (e.g., SELECT COUNT(*) AS myCount)
I look forward to your urgent response