Saturday, August 24, 2019

Database Assignment Example | Topics and Well Written Essays - 1000 words

Database - Assignment Example A class can either have no bookings as minimum or 10 bookings as maximum (cardinality marked as (0, 10) near CLASS/VISIT entity). A booking must always have a class related to it and one class is the maximum (cardinality marked as (1, 1) near BOOKING entity). BOOKING and OWNER An OWNER can have several BOOKINGs and a one BOOKING have a single corresponding OWNER. Hence, one to many relationship exits between these entities (Marked with 1 and M near the respective entity). An OWNER may always have a booking and a booking should always have owner. It is considered a BOOKING and OWNER are mandatory for each other. An OWNER at least has one booking in minimum or many bookings (cardinality marked as (1, M) near OWNER entity). A booking must always have a owner related to it and one owner is the maximum (cardinality marked as (1, 1) near BOOKING entity). OWNER and DOG An OWNER can have several DOGs and a DOG have a single OWNER. Hence a one to many relationship exits between these entities (Marked with 1 and M near the respective entity). An owner may always have at least a dog and a dog should always have owner. Hence it is considered a BOOKING and OWNER are mandatory for each other. An owner at least has one dog or many dogs (cardinality marked as (1, M) near OWNER entity). ... A composite entity ‘attend’ was introduced as the linking entity (marked as 1:M on either side of the composite entity). A class may always have a many dogs attending or no dogs attending a class (marked with a circle on the composite entity). A dog should always attend a class. Hence it is considered a DOG is optional for a CLASS/VIST. A class can either have no dogs attending or 10 dogs as maximum (cardinality marked as (0, 10) near CLASS/VISIT entity). A dog must always have at least a class related to it and one class is the maximum (cardinality marked as (1, 1) near BOKING entity). BOOKING and INVOICE An INVOICE can be related only for a one BOOKING and a one BOOKING have a single corresponding INVOICE. Hence a one to one relationship exits between these entities (marked with 1 and 1 near the respective entity). An invoice always has a booking and a booking should always have an invoice. It is considered a BOOKING and INVOICE are mandatory for each other. An INVOICE always has one booking or many bookings as minimum and maximum (cardinality marked as (1, 1) near INVOICE entity). A booking must always have an invoice related to it and one invoice is the maximum (cardinality marked as (1, 1) near BOOKING entity). The primary and foreign key relevant to each entity is presented in their entity definition table as PK and FK respectively. Entity DEFINITION Entity Name: CLASS/VISIT Â   Entity Description: The details of the Classes and Visits are recorded here Attribute Name Data Type Field Length Required Y/N Validation Rule Primary Key / Foreign Key class_id text 50 Y Not Null PK class_name text 100 Y Â   Â   class_day text 15 Y Â   Â   class_max capacity integer 2 Y Â   Â   class_start_date date 20 Y Â   Â   Entity DEFINITION Entity Name: BOOKING Â   Entity Description:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.