Question: You will develop a program that generates SQL statements ( CREATE TABLE, SELECT, DELETEFROM ) to check referential integrity and normalization ( simplified ) .

You will develop a program that generates SQL statements (CREATE TABLE, SELECT, DELETEFROM) to check referential integrity and normalization (simplified).The input is one database, consisting of a set of SQL tables (relations) with one primary key (PK)for each table, as well as a list of foreign keys (FKs). The input database may change in each run.The schema of the tables will be given as a text file, with one table per line. The actual tables withdata will be already stored in the input database. Your program must generate a short output textfile, but 90% of processing will be done with SQL queries. You may create temp tables or views, tosolve the problem in steps.IMPORTANT: To simplify, all keys are simple keys (one column) and we will not do normalizationwith respect to every candidate key (CK)(general, more complicated textbook definition). That is,do not worry about composite keys (2 or more attributes) and do not worry about CKs in the inputfile.The input is a text file with a list of tables already stored inside the database, where each tablehas a PK and a potential list of FKs (zero or more). The output is a single text file showing if eachtable fulfills referential integrity and if it is normalized or not (on the normal form (2NF,3NF, BCNF)indicated below). More details below.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!