Question: 1 of 2 Problem 1 Create a MyScript.sql script for SQL Server to create a database named StudentProg, containing two tables described below: table Programs
of
Problem
Create a MyScript.sql script for SQL Server to create a database named "StudentProg",
containing two tables described below:
table "Programs" with a column "ProgId" INT NOT NULL and
a column "Name" VARCHAR NOT NULL;
table "Students" with a column "StudId" INT NOT NULL,
a column "Name" VARCHAR NOT NULL,
a colum "YearEnrolment" INT NOT NULL
a column "ProgId" INT NOT NULL;
The primary key of the "Programs" table is "ProgId" and the primary key of the
"Students" table is "StudId". In addition, the attribute "ProgId" in the "Students" table is a
foreign key that references the attribute "ProgId" of the "Programs" table. This foreign
key must not allow us to delete a program if there are students enrolled to that program.
However, updates in Programs table ProgId must be propagated to the Student table.
Your MyScript.sql must also insert the following data at a minimum:
Programs 'Programming';
Programs 'Fashion';
Programs 'Management';
Programs 'Tourism';
Students 'Mary', ;
Students 'John', ;
Students 'Brian', ;
Students 'Anne', ;
Students 'James', ;
Run your script to create this database and its tables.
of
Problem
Create a tiers C# Windows Form, ADO.NET application with two options at the
main menu of the window for:
Showing a DataGridView adapted for the "Students" table, which allows you to see
the data in the table, add new rows, modify rows and delete them deleting several
rows Use SQLAdaper.
Showing a DataGridView adapted for the "Programs" table, which allows you to see
the data in the table, add new rows, modify rows and delete them deleting several
rows Use SQLAdaper.
Note: To correctly handle the deletions and modifications of rows in the case of
restriction by the foreign key, the same foreign key must be defined between the
DataTables. Therefore, both DataTables must be loaded in memory before using any of
these two tables for the first time.
Problem
Include in your solution the business rules that no student can have year of enrolment
neither less than nor greater than Make sure to produce specific messages.
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
