Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

I needed help on constructing the following codes into ten XML documents from SQL. I know how to make up information, however, I am having trouble understanding SQL and how to set it up. Please let m

I needed help on constructing the following codes into ten XML documents from SQL. I know how to make up information, however, I am having trouble understanding SQL and how to set it up.

Please let me know what to do here at your earliest convenience.

Thank you.

XML is a technology concerned with the description and structuring of data. XML document describes any information with flexibility structure. For example, the following XML document describes a note to Tove from Jani with heading and content of the note.

<note>  <to>Tove</to>  <from>Jani</from>  <heading>Reminder</heading>  <body>Don't forget me this weekend!</body></note>

Your assignment is to construct the following XML documents to use in police reports describing user, review, missing, aggression, medical, sanitary, suspicious, product, condition, and status information. The details of the reports are listed below.

User is a person who files a report. This XML document describes the person profile.

user(

     userID SERIAL,

     username varchar(255),

     password varchar(255),

     firstname varchar(255),

     middlename varchar(255),

lastname varchar(255),

     email varchar(255),

dob date,

     gender varchar(10),

profile_photo bytea,

home_phone varchar(50),

     cell_phone varchar(50),

     created_date timestamp default current_timestamp

);

Review is a review of a user. This XML document describes a review of a person who files a report for credibility of the report.

review(

     reviewID SERIAL,

     reviewDescription text,

     star double precision,

     userID serial references users(userID),

     created_date timestamp default current_timestamp

);

Missing is a description of missing object. This XML document describes a description of missing object.

missing (

    missingID SERIAL,

    reporttype varchar (255) NOT NULL,

    reportdescription varchar (255),

    contact varchar (255),

    reward varchar (255),

    location varchar (255),

    photo bytea,

    statusID serial references status(statusID),

    userID serial references users(userID),

    created_date timestamp default current_timestamp

);

Aggression is a description of the violence. This XML document describes a description of the violence.

aggression (

    aggressionID SERIAL,

    reporttype varchar (255) NOT NULL,

    reportdescription varchar (255),

    location varchar (255),

    photo bytea,

    statusID serial references status(statusID),

    userID serial references users(userID),

    created_date timestamp default current_timestamp

);

Medical is a description of the medical need. This XML document describes description of the medical need.

medical(

     medicalID SERIAL,

     reporttype varchar(255) NOT NULL,

     reportdescription varchar(255),

     location varchar(255),

     photo bytea,

      statusID serial references status(statusID),

     userID serial references users(userID),

     created_date timestamp default current_timestamp

);

Sanitary is a description of how dirty the scene is. This XML document describes a description of how dirty the scene is.

sanitary(

     sanitaryID SERIAL,

     reporttype varchar(255) NOT NULL,

     reportdescription varchar(255),

     location varchar(255),

     photo bytea,

      statusID serial references status(statusID),

     userID serial references users(userID),

     created_date timestamp default current_timestamp

);

Suspicion is a description of suspicious objects or activities. This XML document describes a description of suspicious objects or activities.

suspicion(

     suspicionID SERIAL,

     reporttype varchar(255) NOT NULL,

     reportdescription varchar(255),

     location varchar(255),

     photo bytea,

     statusID serial references status(statusID),

     userID serial references users(userID),

     created_date timestamp default current_timestamp

);

Product is a description of reported products or items. This XML document describes a description of reported products or items.

product (

    productID SERIAL,

    productName varchar (255) NOT NULL,

    productDescription varchar (255),

    contact varchar (255),

    price varchar (255),

    location varchar (255),

    photo bytea,

    statusID serial references status(statusID),

    conditionID serial references condition(conditionID),

    userID serial references users(userID),

    created_date timestamp default current_timestamp

);

Condition describes the condition of reported products or item. This XML document describes the condition of reported products or item.

condition (

     conditionID SERIAL,

     conditionDescription varchar (255)

);

Condition describes the status of each report. This XML document describes the status of each report.

CREATE TABLE status (

     statusID SERIAL,

     statusDescription varchar (255)

);

After constructing the XML documents, you will submit the attachments of each xml document

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question