# data[].attributes.body
Hi, last slide from logical design:

CREATE TABLE FILM (NAME, RELEASE_DATE) PRIMARY KEY (NAME, RELEASE_DATE)

CREATE TABLE SCREEN (SCREEN_NO, SEATS) PRIMARY KEY

(SCREEN_NO)

CREATE TABLE FILM_SHOWING (VIEWING_DATE, VIEWING_TIME, SCREEN_NO, FILM_NAME, FILM_RELEASE_DATE) PRIMARY KEY (VIEWING_DATE, VIEWING_TIME, SCREEN_NO) FOREIGN KEY (SCREEN_NO) REFERENCES SCREEN(SCREEN_NO) FOREIGN KEY (FILM_NAME, FILM_RELEASE_DATE) REFERENCES FILM(NAME, RELEASE_DATE) NOT NULL

why is NAME, RELEASE_DATE not null when it references a PK and then why not SCREEN_NO not null as it also 1 optionality (I assumed because references PK?) Many thanks

# data[].attributes.body
How is the name in the second table a primary key as the values repeat in the column? Should not name and tour_code together be the primary key?

# data[].attributes.headline
Clarifications on "NOT NULL" Constraints and Primary Key Selection

# data[].attributes.subject
Clarifications on "NOT NULL" Constraints and Primary Key Selection

# data[].attributes.body
Dear Peter,

I have two questions about database.

1. In the first picture, neither foreign key includes a "NOT NULL" constraint, whereas in the second picture, one foreign key does and the other does not. What determines whether or not to apply "NOT NULL" to foreign keys?

2. For the "FILM_SHOWING" table, is there a specific rationale for not using attributes from other entities as its primary key? Does the primary key for a table like "FILM_SHOWING" not necessarily have to be a composite of foreign keys from related entities?

Looking forward to your guidance on these points.

Thank you!

# data[].attributes.headline
I wonder know why name can be primary key in excursion  but not in passenger 

# data[].attributes.subject
I wonder know why name can be primary key in excursion  but not in passenger 

# data[].attributes.body
about the step 4, I may not understand the meaning of "multivalued attribute -> a new logical model table". I cannot image how to operate the change.

Since the last lecture mentioned, the attribute SERVICE_DATE is a multivalued attribute, because there may have more than two elements included in one line.

In the context, can I just separate the SERVICE_DATE to two new column named BEGIN_DATE and END_DATE, and allow the BEGIN_DATE could be NULL?

# data[].attributes.headline
some examples more questions on cardinality

# data[].attributes.subject
some examples more questions on cardinality

# data[].attributes.body
Hi, could you please give or share some link on more questions which ask us to create ER diagrams and some more material to understand cardinality. Thank you.

# data[].attributes.body
Sir,

What are pros and cons of identifying 2 or more primary keys in a table? Is there any decision making factor to consider in doing so ?

# data[].attributes.body
Dear Professor Peter

In this picture, PRODUCT_NO and Name have identifiers, but the primary key is PRODUCT_NO. Also NAME and PHONE_NO have * identifiers, however the primary key is only NAME. So I am confused the relationship with primary key and identifier.

# data[].attributes.body
The example used for logical design(week-3) is extremely confusing. Please consider using new better simple example with less ambiguity in attributes names.

# data[].attributes.body
Will the weekly quizzes be timed? E.g. 5 minutes limit? Thanks

# data[].attributes.body
Please, why do we write pseudo SQL? Why not write real SQL? Jing

# data[].attributes.body
What's the difference between a table and a relation?