Implement a database design 3. Write the CREATE TABLE statements needed to imple
ID: 3547642 • Letter: I
Question
Implement a database design
3. Write the CREATE TABLE statements needed to implement the following design in the EX schema:
These tables provide for members of an association, and each member can be registered in one or more groups within the association. There should be one row for each member in the Members table and one row for each group in the Groups table. The member ID and group ID columns are the primary keys for the Members and Groups tables. And the Members_Groups table relates each member to one or more groups.
When you create the tables, be sure to include the key constraints. Also, include any null or default constraints that you think are necessary.
Write the CREATE TABLE statements needed to implement the following design in the EX schema: These tables provide for members of an association, and each member can be registered in one or more groups within the association. There should be one row for each member in the Members table and one row for each group in the Groups table. The member ID and group ID columns are the primary keys for the Members and Groups tables. And the Members_Groups table relates each member to one or more groups. When you create the tables, be sure to include the key constraints. Also, include any null or default constraints that you think are necessary.Explanation / Answer
CREATE TABLE Members
(
member_id int NOT NULL PRIMARY KEY,
First_Name varchar(25) NOT NULL,
Last_Name varchar(25),
Address varchar(255),
City varchar(25),
State varcahr(25),
phone varchar(10)
)
CREATE TABLE member_groups
(
group_id int NOT NULL,
member_id int NOT NULL
)
CREATE TABLE groups
(
group_id int NOT NULL PRIMARY KEY,
group name varchar(25) NOT NULL
)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.