Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

consider two following sql tables: CREATE TABLE user ( user _ id int PRIMARY KEY, first _ name varchar ( 2 0 ) DEFAULT NULL,

consider two following sql tables:
CREATE TABLE user (
user_id int PRIMARY KEY,
first_name varchar(20) DEFAULT NULL,
last_name varchar(20) DEFAULT NULL
)
CREATE TABLE omment (
comment_id int PRIMARY KEY,
rate int DEFAULT NULL,
user_id int NOT NULL,
FOREIGN KEY(user_id) REFERENCES user(user_id)
)
now consider this rule: "The user's first and last name will not be completely displayed, only the first character of the first and last name will be shown."
add a sql constraint that supports this rule.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

What would you do?

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago