Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DataBase managment design. Do the dowsings: 1. Run the sql commands written in ddl.sql file attached 2. Create_a dummy data. You can use fake

 DataBase managment design.

 

Do the dowsings:

1. Run the sql commands written in ddl.sql file attached

2. Create_a dummy data. You can use "fake data generators"

3. Write followings

- Write the query that gets all the students with their grades which take for example MAT 101.

- Write the query that gets all lectures with their grades which the student with id for example 1


 

 

 

image (14).jpeg 

create table students ( ); student_id serial primary key, citizen_number char (11) unique not null, first name varchar(100) not null, middle name varchar(100), last name varchar(100) not null, birth date date not null, address varchar (1024) not null create table lectures ( lecture_code char (7) primary key, name varchar(100) not null, credits int ); create table grades ( description ); grade_id serial primary key, char (2) not null, value double precision not null insert into grades (description, value). values ('AA', 4.0), ('BA, 3.5), ('BB', 3.0), ('CB', 2.5), ('CC', 2.0), ('DC, 1.5), ('DD', 1.0), ('FD', 0.5), ('FF', 0.0), ('NA', -1), ('P', -1); create table enrolls ( enroll_id serial primary key, student_id int references students (student_id) not null, lecture_code char (7) references lectures (lecture_code) not null, grade_id int references grades (grade_id) )

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Distinguish between joint products and by-products.

Answered: 1 week ago

Question

=+DJIA on different days of the week? Explain.

Answered: 1 week ago

Question

When do you use a make-table query?

Answered: 1 week ago