Questions
Complete the following questions with proper citations; there is a 150-word minimum per question. Questions: Describe...

Complete the following questions with proper citations; there is a 150-word minimum per question. Questions: Describe the difference between database structural integrity and semantic data integrity. Describe the preferred method of implementing referential integrity in a relational database. Explain two ways that views can be used to implement data security. What is a cascading REVOKE, and what effect can it have on database security?

In: Computer Science

Which block cipher mode to use? For each of the following scenarios, determine which of the...

  1. Which block cipher mode to use? For each of the following scenarios, determine which of the four block cipher modes discussed in class would be most appropriate. Justify your answer.

    1. Encryption of the social security number field within every record of a database.

    2. Encryption of a Word document (.doc) that will be sent as an email attachment.

    3. Sector-by-sector encryption of an external hard drive.

    4. Real-time encryption of a non-packetized bit stream (e.g. raw digital video).

    5. Suppose a communication system encrypts data using AES-128 and has the ability to update keys over the network; that is, when a node on the network needs to update its key, a network controller can send the node a new key encrypted with the current key. What block cipher mode would me most appropriate when encrypting the new key to send to the node?

In: Computer Science

Your firm maintains a citation index of biomedical journal articles used by a variety of medical...

Your firm maintains a citation index of biomedical journal articles used by a variety of medical research institutes and pharmaceutical firms. Each article is identified by a unique "DOI number"; in addition to this number, you want the database to store each article's title, abstract, date of publication, journal volume number, journal issue number, and journal pages. Each article is authored by one or more researchers. For each researcher, your database should store a family name, given name, date of birth, and current employer. The database should remember which researchers authored each article, and the order they appear in the article writing credits.

Each article appears in a single journal, and each journal is identified by a unique "ISSN" number. The database should be able to identify which journal each article appeared in. Furthermore, for each journal, the database should remember its name and the name of the organization that publishes it. Sometimes journals change names, and one journal "continues' another journal. For example, the ORSA Journal on Biomedical Computation might become the INFORMS Journal on Biomedical Computation when its publishing organization merges with another organization. The name change makes it a different journal but the database should be able to remember which journal (if any) "continues" any given journal.

Finally, articles usually contain multiple citations to other articles. For example, an article about clinical treatment of a particular disease might contain citations to dozens of prior research articles about that disease. This information can be very useful to researcher, so the database should be able to store the full pattern of citations between articles. Note that an article not only usually cites many other articles but may also be cited by many other articles.

  1. Create a high-level ERD which shows only the cardinality and modality between the main entities.
  2. Write out the tables including the primary keys and the foreign keys.(see details below)
  3. Complete a full ERD with all tables, cardinalities and modalities.

In: Computer Science

(i) Outline Friedman's argument in "The Social Responsibility of Business is to Increase its Profits"; (ii)...

(i) Outline Friedman's argument in "The Social Responsibility of Business is to Increase its Profits"; (ii) elaborate in particular why Friedman argues that keeping social responsibility out of business increases or at least not does interfere with a broader sense of "our freedom"; (iii) provide two arguments to support Friedman's view that keeping social responsibility out of business increases or at least does not interfere with our freedom and supplement your argument with real-word examples (if citing empirical data, facts, you must reference from where you got this information and include the citations in a bibliography); and (iii) provide two arguments that argue against Friedman's view and supplement your argument with real-world examples (if citing empirical data, facts, you must reference from where you got this information and include the citations in a bibliography).

In: Accounting

Given the same simple Employee-Workson-Project database schema , which contains three files described as follows:


Given the same simple Employee-Workson-Project database schema , which contains three files described as follows:

Emp (eid : integer, ename : string, age : integer, salary: real)

Workson (eid : integer, pid : integer, hours : integer)

Project (pid : integer, pname : string, budget : real, managerid : integer)

Note : eid, ename, age and salary are the employee id, name, age and salary respectively. Also, hours is the number of hours worked by employee on a project. The rest of the attributes pid, pname, budget and managerid are the project id, name, budget and managerid respectively. A manager is an employee.

Assume that an update is to be made to this database to enter information about a new project manager who is now the new manager of an existing project (replacing the old manager) and although he is new, he has worked some hours in another existing project. Answer the following questions on what specific relations, attributes and operations (eg. insert, modify, delete) that need to be done for this update to be implemented in the entire database.

Provide your answers both in descriptive sentences and using the formal database operations of INSERT, MODIFY, DELETE with specific attributes and relations when possible. An example formal insert of an employee record into the Emp table is:
INSERT < eid, ename, age, salary> into Emp; // for new Employee record

And an example descriptive sentence is:

i). do an insert operation for a new employee record into the Emp table.

(a) Give the set of needed insert, modify or delete operations for this update.

(b) What types of integrity constraints (explain using attributes, eg, eid of relevant files)) would you expect to check for this update to be done?

(c) Which of these integrity constraints are key, entity integrity, and referential (foreign key) integrity constraints and which are not?

(d) Specify all the referential integrity (foreign key) constraints on this database in the format Referring_Relation.Attribute --> Referred_Relation.Attribute

In: Computer Science

Write a Java PATRON class with fields that reflect the structure of your patrons table. Write...

Write a Java PATRON class with fields that reflect the structure of your patrons table.

Write a java FACTORY class with these two methods:

  • getPatron (String patronID) that returns a patron object for the requested patronID. The patron object that is returned should have field values that were loaded from the database using JDBC.
  • updatePatron(Patron PatronToUpdate) that returns a string indicating whether the patron object that was passed in was successfully updated in the database or not. The method should update all patron fields except for the patronID which we will consider immutable.

Note: The factory class is the only class in your project that should allow JDBC code

Write any other classes you need to produce a java application that allows you to retrieve a patron into a Graphical user interface, change something about that patron (except for the patronID which should be read only), and save the patron back to the database using your update method.   After an update please let the user know if the update was successful or not.

EDIT: Patrons Table SQL

Create table Patrons (
PatronID int not null constraint PatronID_PK primary key,
FirstName varchar(255),
LastName varchar(255),
Address varchar(255),
City varchar(255),
State varchar(255),
Zip int,
Phone varchar(20),
Email varchar(255) constraint Email_UK unique,
CardType varchar(30),
Constraint CHK_CC check (CardType in('MasterCard', 'Discover', 'Visa', 'Amex')),
CardNumber varchar(20),
BirthDate date);

In: Computer Science

C++ Implement the following code: More Info added: Database: Generally, a user should instantiate a single...

C++

Implement the following code:

More Info added:

Database:

Generally, a user should instantiate a single database object and work from there. The database object should include commands to do the following:

 You should allow a constructor function with no arguments (other constructors may be included if desired). This creates an “empty” database.

 An add table function that takes a single table object and a name, and adds that table to the database.

 A drop function that takes a table name and deletes it from the database

 * A save function that takes a file name and saves the database to that file (save format is entirely up to you).

 * A load function that takes in a file name and loads in a database from that file. Any existing database should be deleted.

 * A merge function that allows another database to be merged into that one.

 * A copy function that copies an entire database.

 A list table function that returns a list of all table names in the database

 A get tables function that returns all the tables in the database.

 A query function (described below, separately)

 * A delete command. The structure of the delete command should follow that of the query command, except that instead of returning a table, the table in the FROM portion has the appropriate tuples deleted.

 * An update/modify command. The modify command should take a table name, a WHERE clause (as in the query command), and a SET clause. The SET clause should be able to reference attributes of the table, and set them to values that are either a constant or (in the case integers and floats) a computed function on attribute values (from that table). The operations +, - , *, and / should be supported. Note that there are multiple ways to handle a returned list of names or the tables. For instance, you might use an array, or a vector, or you might return a set or some other container.

Note: Don't use map, please vectors only.

[Code]

#include "database.h"

Database::Database(){

}


Database::Database(vector Tables){
  

}

//Add a table to the database

//Ownership of the table is permanently transferred to the database, and it will be destroyed when the database is destroyed.

//Throws an \a InvalidOperationError if \a name already exists in the database

//param name what to call the table in the database

void Database::add_Table(string table_name, Table tab){
  
}

//Remove a table from the database.

//The table is destroyed with 'delete' when this function is called.

//Throws a \a TableDoesNotExistError if \a name does not exist in the database.

//param name which table to remove from the database

//returns A pointer to the Table, which can now be destroyed

void Database::drop_Table(string table_name){

}

/*

Save the database to a file,

Throws an \a IOError on failture.

\param filename the output fie

*/
void Database::save(string filename){

}

/*

Load a database from a file, this will clear any existing records

Throws an \a IOError on failture.

\param filename the input file

*/
void Database::load(string filename){

}

/*

Merge another database into this one.

Tables in this database are overwritten by tables in \a database.

\param database The database that you want to merge into this one.

*/
void Database::merge(const Database& database){

}

/**

Make a copy of this database

\returns a one-for-one copy / clone of this database

**/
Database Database::copy(){

}

//Returns a list of all the tables currently in the database
vector Database::list_Tables(){

}

//Returns the table named *table_Name* in the database.

//Throws a \a TableDoesNotExistError if \a table_Name does not exist in the database
vector

* Database::getTables(){
  
}

/****

//Perform a query on the database

//Throws a \a TableDoesNotExistError if \a from does not exist.

//Throws a \a QuerySyntaxError if \a select or \a where have a syntax error.

\param select which columns to include in the returned Table

\param from which table to query from

\param where the conditions for the query from

\return A pointer to Table with all of the records that match the query

**/
Table Database::query(string select, string from, string where){


}

/******

Delete all records that match the query

Throws a \a TableDoesNotExistError if \a from does not exist.

Throws a \a QuerySyntaxError if \a where has a syntax error.

\param from which table to query from

\param where the conditions for the query to match

******/
void Database::delete_From(string from, string where){

}

//********

Must modify the records in table.

Throws a \a TableDoesNotExistError if \a table does not exist

Throws a \a QuerySyntaxError if \a where or \a set have a syntax error

\param table_name name of the table to update records in

\param where a SQL where clause to find records in the table

\param set a SQL set clause

*****************//

void Database::update(string table_Name, string where, string set){

}

[/EndCode]

In: Computer Science

Visit the IRS.gov website and find a tax law update for 2018 that interests you. Write...

Visit the IRS.gov website and find a tax law update for 2018 that interests you. Write a brief summary of the update.

In: Accounting

Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot of...

Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot of branches spread across different Wilayats in the country. As a database administrator, which client server architecture will you be preferring for this hypermarket and why. Support you answer with valid in-text citations and references.

In: Computer Science

– Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot...

– Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot of branches spread across different Wilayats in the country. As a database administrator, which client server architecture will you be preferring for this hypermarket and why. Support you answer with valid in-text citations and references.

In: Computer Science