Question
1. (DDL CREATE with integrity constraint) Write a command to create Benefit table, and Detail_Benefit which includes the definition of Required Data (Mandatory), Primary Key
1. (DDL CREATE with integrity constraint) Write a command to create Benefit table, and Detail_Benefit which includes the definition of Required Data (Mandatory), Primary Key (Entity Integrity), Foreign Key (Referential Integrity), and Domain Constraint, where: ID_Benefit begins with the letter B and is followed by 3 numeric characters, for example: B001 Member ID begins with the letters A-Z and is followed by 5 numeric characters, for example: A00001 Subscription_Price between 100,000 and 1,000,000 End_Date must be greater than Start_Date
2. DML Basic Query. Write the command to: a. Displays Staff ID, Staff Name, number of members handled, where the type of member is other than Gold and the name of the Member starting with the letter A. b. Displays the Benefit ID and the number of members who subscribed starting in January 2019 and ending in May 2019. c. Displays Member ID and the number of benefit subscriptions, which began to subscribe in January 2019, as well as the number of subscriptions for more than 3 benefits.
3. DML Sub Query and Set Operators. Write the command to: a. Displays ID_Members who have subscribed to at least 1 benefit, using: i. Join ii. Sub Query IN iii. EXISTS Sub Query iv. INTERSECT Set Operator b. Displays the ID_Members who have never subscribed to benefits, using: i. Sub Query NOT IN ii. Sub Query NOT EXISTS iii. EXCEPT Set Operator
Staff ID Staff Nama_Staff Benefit ID Benefit Nama_Benefit Harga Langganan 1..1 1..11 0..* 0..* Anggota ID Anggota Nama_Anggota 1..1 Jenis_Anggota Detail_Benefit ID Benefit 1..* ID Anggota Tanggal Mulai Tanggal_Akhir Staff ID Staff Nama_Staff Benefit ID Benefit Nama_Benefit Harga Langganan 1..1 1..11 0..* 0..* Anggota ID Anggota Nama_Anggota 1..1 Jenis_Anggota Detail_Benefit ID Benefit 1..* ID Anggota Tanggal Mulai Tanggal_AkhirStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started