Database Design and Legal Issues for Storing Credit Card Details - Desklib
Verified
Added on  2023/06/11
|17
|1616
|451
AI Summary
This article from Desklib discusses the importance of entity relationship diagrams in database design and the legal issues that can arise from storing credit card details. It also provides solutions to prevent unauthorized access to confidential information.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
COVER PAGE
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
6.Detailsofcustomerswholivein Victoria --Name: gursevak singh --studnet ID: 40485 select * from customer where addresslike '%3000'; 7.Delete customer john p sith --Name: gursevak singh --studnet ID: 40485 delete from customer where customerID='1'; 8.Addtables
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
ï‚·Adding booking table --Name: gursevak singh --studnet ID: 40485 create table booking(bookingID smallint not null primary key, customerID smallintnot null, bookingDate date not null, customerFeedback nvarchar(500) not null ); ï‚·Add relationship between booking table and customer table --Name: gursevak singh --studnet ID: 40485 alter table booking add constraint booking_fk1 Foreign key (customerID) references customer (customerID) on delete NO ACTION;
ï‚·Inserting 6 records in the booking table --Name: gursevak singh --studnet ID: 40485 insert into bookingvalues(1,2,'2018-05-05','notbad'), (2,3,'2018-05- 06','not bad'), (3,3,'2018-05- 07','not bad'), (4,4,'2018-05- 08','not bad'), (5,4,'2018-05- 09','not bad'), (6,4,'2018-05- 10','not bad'); 9.Delete a customer who has a booking --Name: gursevak singh --studnet ID: 40485 delete from customerwherecustomerID=3;
10.Display all bookings grouped by customer --Name: gursevak singh --studnet ID: 40485 select bookingID,customerID,bookingdate,customerFeedback from booking group by customerID,bookingID,bookingdate,customerFeedback;
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
11.Select customer names and booking dates sorted with booking dates --Name: gursevak singh --studnet ID: 40485 select customer.firstname,customer.lastname,booking.bookingdate from customer,booking wherebooking.customerID=customer.customerID order by bookingdate desc; 12.Customers who have not made a booking --Name: gursevak singh --studnet ID: 40485 select * from customer where customerID not in (select customeriD from booking);
Task 2b 13.create other database tables --Name: gursevak singh --studnet ID: 40485 create table model( modelID smallint not nullprimary key, type nvarchar(50) not null, price decimal not null ); create table assets( itemID smallint not null primary key, modelID smallint not null, constraint assets_fkq foreign key (modelID) references model (modelID) on delete no action ); create table booking_assets( itemID smallint not null, bookingID smallint not null, constraint ba_pk primary key (itemID,bookingID), constraint ba_fk foreign key (itemID) references assets (itemID), constraint ba_fk2 foreignkey (bookingID) references booking (bookingID) ); create table payment( paymentid smallint not null primary key, bookingID smallint not null, amount decimal not null, paymentDate date not null, discount decimal not null, constraint payment_fk foreign key (bookingID) references booking (bookingID) );
14.Addingrecords --Name: gursevak singh --studnet ID: 40485 insert into model values (1,'inflatable',100),(2,'chair',20), (3,'table',50); insert into assets values(1,1),(2,2),(3,3); insert into booking_assets values (1,1),(2,2),(3,3); insert into payment values (1,1,200,'2018-05-08',0),(2,2,300,'2018-05- 09',10),(3,3,300,'2018-05-10',12);
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
15.All customers who have rented inflatables --Name: gursevak singh --studnet ID: 40485 select customer.* from customer,booking,booking_assets,assets,model where booking.customerID=customer.customerID andbooking_assets.bookingID=booking.bookingID and assets.itemID=booking_assets.itemID andmodel.modelID=assets.modelID and model.type='inflatables';
16.All customers who have rented inflatables or chairs --Name: gursevak singh --studnet ID: 40485 select customer.* from customer inner join booking on booking.customerID=customer.customerID innerjoin booking_assets on booking_assets.bookingID=booking.bookingID inner joinassets on assets.itemID=booking_assets.itemID innerjoin model on model.modelID=assets.modelID where model.type='inflatables' or model.type='chair'; 17.Count of booking days for each customer --Name: gursevak singh --studnet ID: 40485 select customer.customerID,customer.firstname,customer.lastname,count(booking.book ingID) FROM customer, booking where booking.customerID=customer.customerID group by customer.customerID,customer.firstname,customer.lastname;
18.Total amount paid for each customer --Name: gursevak singh --studnet ID: 40485 select customer.customerID,customer.firstname,customer.lastname,sum(paym ent.amount)-sum(discount)astotal FROM customer,booking,paymentwhere booking.customerID=customer.customerID andpayment.bookingID=booking.bookingID group by customer.customerID,customer.firstname,customer.lastname;
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Task 3 19.Justification for starting with a diagram instead of the database software. The process of coming up with diagrams which are referred to as entity relationship diagrams is called entity relationship modelling and a stage in database design that is done prior to the actual database implementation is a database management software (DBMS). According to good database design standards the first step to designing a database is to model the database using either top-down approach or bottom-up approach. Use of top-down approach is the approach that designs the database using entity relationship diagrams while bottom-up approach uses normalization to get the entities from the business rules. These two approaches are used interchangeably to help the database designer to understand the database comprehensively thus making sure that all entities, their attributes and the relationships between the entities are captured. Modelling the database before doing the actual implementation makes the implementation process easy since everything about the database is already stated thus the developer only has to make the tables based on the entities and the relationships achieved during the modelling process. This helps save time and avoid errors which could lender the database ineffective because of errors that could have been captured during the design stage of the database development. 20.Legal issues resulting from saving of credit card details and how they could be solved With the current and expected growth of the partykids business, the business will have to start recording details of credit cards for customers who pay for their booking using credit cards. This will help the business by making the payment process easy as all the information about a customer is already in the database thus more orders will be processed and at a higher rate. Storing customer’s credit card details can bring legal issues to the business because is the information is accessed by malicious users like hackers, the information could be used to defraud the customers and this would be blamed on the business as it is supposed to make sure the customer’s information is safe from all risks. There have been many cases where companies have gone broke because their private information has been accessed by hackers. To prevent access of this confidential information, partykids will have to make sure that the database is deployed in a very secure environment that is not easy for hackers or malicious users to access. Apart from the secure deployment environment, the business should make sure that the information is stored in an encrypted format that is not easy to decrypt if the malicious users are able to bypass the secure environment.