Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the DDL provided, create a database-driven application with the following

ID: 3756591 • Letter: U

Question

Using the DDL provided, create a database-driven application with the following features:

All pages must be protected by forcing the user to login first.

The login page must accept any username, but requires the password: secret

The username must be stored in the session and displayed at the top of every page in the site.

Once the user has logged in, display the contents of the table (i.e., the results of a select statement).

Also allow the user to insert new rows and delete existing rows.

Create a good, intuitive user interface.

DDL_Sales:

create database sales;

use sales;
create table products (id int primary key auto_increment, title varchar(100), price decimal(5, 2) );


insert into products (title, price) values ("Cobra AMP Driver", 299.99);
insert into products (title, price) values ("Maxfli Belly Putter", 39.97);
insert into products (title, price) values ("Flippin Gripper Jig", 2.47);
insert into products (title, price) values ("Easton Bat", 199.97);
insert into products (title, price) values ("Nike Goalie Gloves", 99.97);

Explanation / Answer

PASSWORD =hashed_password
Applies to the HASHED keyword only. Specifies the hashed value of the password for the login that is being created.

HASHED Applies to SQL Server logins only. Specifies that the password entered after the PASSWORD argument is already hashed. If this option is not selected, the string entered as password is hashed before it is stored in the database. This option should only be used for migrating databases from one server to another. Do not use the HASHED option to create new logins. The HASHED option cannot be used with hashes created by SQL 7 or earlier.

MUST_CHANGE Applies to SQL Server logins only. If this option is included, SQL Server prompts the user for a new password the first time the new login is used.

CREDENTIAL =credential_name
The name of a credential to be mapped to the new SQL Server login. The credential must already exist in the server. Currently this option only links the credential to a login. A credential cannot be mapped to the System Administrator (sa) login.

SID = sid
Used to recreate a login. Applies to SQL Server authentication logins only, not Windows authentication logins. Specifies the SID of the new SQL Server authentication login. If this option is not used, SQL Server automatically assigns a SID. The SID structure depends on the SQL Server version.

create database sales;

use sales;

insert the product details:

insert into products (title, price) values ("Cobra AMP Driver", 299.99);
insert into products (title, price) values ("Maxfli Belly Putter", 39.97);
insert into products (title, price) values ("Flippin Gripper Jig", 2.47);
insert into products (title, price) values ("Easton Bat", 199.97);
insert into products (title, price) values ("Nike Goalie Gloves", 99.97

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote