Question

You have been given a univerity business plan that produced the following information: PERSON: lname, fname,...

You have been given a univerity business plan that produced the
following information:
    PERSON: lname, fname, rname, idnum, private, linkblue
        lname, fname, rname are variable length strings
        idnum is type INT and is a key attribute
        private is BOOLEAN
        linkblue is string of 8 characters 

    ADDR:  idnum, adtype, streetaddr, city, state, country, zip
        idnum is a foreign key to PERSON.idnum
        adtype is a string in the set {"bill","permanent","local"}
        streetaddr is a variable length string that includes #, 
            street, and maybe apt #
        state is a 2 letter char denoting the state
        country is a 2 letter char denoting country
        zip is string no bigger than 10 characters.

    ADVISOR: student, advisor
        student is a foreign key to PERSON.idnum
        advisor is a foreign key to PERSON.idnum

    DIGITAL: smtype, idnum, smaddr
        smtype is a string in the set {"email", "facebook", "twitter"}
        idnum is a foreign key to PERSON.idnum
        smaddr is a variable length string

        There is a primary key on the pair (smtype, idnum)

    BILLING: idnum, txnum, postdate, amount, paid
        idnum is a foreign key to PERSON.idnum
        txnum is an INT and a key attribute, this is the transaction #
        postdate is type DATE and is the date the bill was posted
        amount is a DECIMAL(10,2) and is not null
        paid is boolean, true=paid, false=unpaid
#2 Write the DDL statement to alter the DIGITAL table to make both
   smtype and smaddr not allowed to be NULL.

The question is in bold.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the SQL Query below.

QUERY

ALTER TABLE DIGITAL MODIFY COLUMN smtype VARCHAR2(20) NOT NULL;

ALTER TABLE DIGITAL MODIFY COLUMN smaddr VARCHAR2(100) NOT NULL;

Add a comment
Know the answer?
Add Answer to:
You have been given a univerity business plan that produced the following information: PERSON: lname, fname,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You have been given a university business plan that produced the following information: PERSON: lname, fname,...

    You have been given a university business plan that produced the following information: PERSON: lname, fname, rname, idnum, private, linkblue lname, fname, rname are variable length strings idnum is type INT and is a key attribute private is BOOLEAN linkblue is string of 8 characters ADDR: idnum, adtype, streetaddr, city, state, country, zip idnum is a foreign key to PERSON.idnum adtype is a string in the set {"bill","permanent","local"} streetaddr is a variable length string that includes #, street, and maybe...

  • You have been given a univerity business plan that produced the following information: PERSON: lname, fname,...

    You have been given a univerity business plan that produced the following information: PERSON: lname, fname, rname, idnum, private, linkblue lname, fname, rname are variable length strings idnum is type INT and is a key attribute private is BOOLEAN linkblue is string of 8 characters CREATE TABLE PERSON (idnum INT NOT NULL PRIMARY KEY, lname varchar(40), fname varchar(40), rname varchar(40), private BOOLEAN, linkblue char(8) NOT NULL); ADVISOR: student, advisor student is a foreign key to PERSON.idnum advisor is a foreign...

  • Don't attempt if you can't attempt fully, i will dislike and negative comments would be given...

    Don't attempt if you can't attempt fully, i will dislike and negative comments would be given Please it's a request. c++ We will read a CSV files of a data dump from the GoodReads 2 web site that contains information about user-rated books (e.g., book titnle, publication year, ISBN number, average reader rating, and cover image URL). The information will be stored and some simple statistics will be calculated. Additionally, for extra credit, the program will create an HTML web...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT