Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a table called 'client' with the following columns... Please use MySQL and assume MariaDB Please provide comments and explanation 1. Create tables in the

Create a table called 'client' with the following columns...

Please use MySQL and assume MariaDB

Please provide comments and explanation

image text in transcribed

1. Create tables in the given order -- 32 points Create a table called client with the following columns: o id - an auto-incrementing integer which is the primary key, size 11 o first_name - a varchar with a maximum length of 255 characters, cannot be null o last_name - a varchar with a maximum length of 255 characters, cannot be null o dob - a date type with no default and null not allowed o The combination of the first_name and last_name must be unique in this table. Name this constraint as full_name Create a table called employee with the following columns: o id - an auto-incrementing integer which is the primary key, size 11 o first_name - a varchar of maximum length 255, cannot be null o last_name - a varchar of maximum length 255, cannot be null o dob - a date cannot be null o date_joined - a date cannot be null The combination of the first name and last_name must be unique in this table. Name this constraint as full_name Create a table called project with the following columns: o id - an auto-incrementing integer which is the primary key, size 11 o cid - an integer which is a foreign key reference to the client table o name - a varchar of maximum length 255, cannot be null o notes - a text column The project name must be unique in this table Create a table called works on representing a many-to-many relationship between employees and projects, with the following properties: o eid - an integer which is a foreign key reference to the employee table opid - an integer which is a foreign key reference to the project table o start_date-a date, not null o The primary key is a combination of eid and pid Do not name any constraints other than the full_name for client and employee

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

Students also viewed these Databases questions

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago