Question & Answer: Design 3 tables including properties for appropriate fields……

tbl      Design 3 tables including properties for appropriate fields.
Enter at least 5 records in each table.
tbl      Set relationships (joins) between tables
qry1   Create a query showing all fields from one table
qry2   Create a query showing fields from more than 1 table
qry3   Create a query using a sort (ascending or descending).
qry4   Create a query contain a function such as Count or Sum
frm1   Create a form for one table (shows one record at a time)
frm2   Create a form with a subform (the subform shows data from another table)
rpt1   Create a report using grouping (by one field), a page header, & page footer
Type in a separate MS Word file the following:
SQL Code – type out the code you would use.
It is optional to include in the MS Access database file.
SQL code to display all fields in one of your tables.
SQL code to display a few fields and use a sort on one of the fields.
SQL code using the COUNT function.
SQL code (that could be used) to create (from scratch) one of your tables.
SQL code to insert a new record into one of your tables.
Database Security Plan – explain in detail 3 ways to secure your database management system from cyberattacks or breeches.
List 3 future improvements (enhancements) for your system such as modifications to tables, forms, queries, and/or reports. Using database fundamentals

Expert Answer

 

1) Designing of 3 tables is given below:

i) create table Store(Store_id int NOT NULL, Store_name varchar(255), City varchar(255), Street varchar(255), State varchar(255), Zip_code varchar(255), PRIMARY KEY (Store_id));

ii) create table Customer(Customer_id int NOT NULL, Gender varchar(255), City varchar(255), Street varchar(255), State varchar(255), Zip_code varchar(255), PRIMARY KEY (Customer_id));

iii) create table Order(Order_id int NOT NULL, Date varchar(255), PRIMARY KEY (Order_id), FOREIGN KEY (Customer_id) REFERENCES Customer(Customer_id));

2) Inserting 5 records in Store table is given below:

INSERT INTO Store (Store_id, Store_name, City, Street, State, Zip_code) VALUES (01, abc, lko, max street, newSouth, 110022);
INSERT INTO Store (Store_id, Store_name, City, Street, State, Zip_code) VALUES (02, def, lko, max street, newSouth, 110022);
INSERT INTO Store (Store_id, Store_name, City, Street, State, Zip_code) VALUES (03, jkl, lko, max street, newSouth, 110022);
INSERT INTO Store (Store_id, Store_name, City, Street, State, Zip_code) VALUES (04, mno, lko, max street, newSouth, 110022);
INSERT INTO Store (Store_id, Store_name, City, Street, State, Zip_code) VALUES (05, pqr, lko, max street, newSouth, 110022);

In the same we can enter 5 records in “Customer” table and in “Order” table.

3) Query for showing all the fields of one table is given below. Below we have show commands to display all the fields of tables Store, Customer and Order

i) select * from Store;
ii) select * from Customer;
iii) select * from Order;

4) Query for sorting is given below:

i) select * from Store orderby Store_id asc
ii) select * from Store orderby Store_id desc

5) Query with count function is given below:

i) select count(Store_id) from Store;

Still stressed from student homework?
Get quality assistance from academic writers!