Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

make A SQL database that consists of: at least six database tables each table must have a primary key at least one of the primary

make A SQL database that consists of:

  • at least six database tables
  • each table must have a primary key
    • at least one of the primary keys must be an auto-incremented integer primary key (like a Member ID)
    • at least one of the primary keys must be a 'natural' primary key that relies on its data (like a student ID)
    • at least one of the primary keys must consist of more than one field
  • at least one lookup table (like member_broad)
  • at least one each of the data types INT, CHAR, VARCHAR(n), DATE, DATETIME, LONGTEXT, DECIMAL in at least one of the tables
  • foreign keys such that:
    • all tables must be a foreign key source or destination
    • at least one table must be both a foreign key source and destination (like narrow)
    • at least one view that displays the results of a two table foreign key relationship (like vBroadNarrow)
    • at least one two-step foreign key relationship (like memberNarrow narrow broad)
    • at least one view that displays the results of a three table foreign key relationship (like vMemberBroad)
    • at least one foreign key with an ON DELETE/ON UPDATE CASCADE constraint
    • at least one foreign key with an ON DELETE/ON UPDATE RESTRICT constraint
  • at least one field that allows NULL as the default value
  • at least one DATETIME field with a default value of the current date/time
  • at least one non-DATE/TIME field with a custom default value of your choice
  • at least one unique index on a non-primary key field (like broadDesc in broad)
  • at least one non-unique index on non-primary key fields (like inFullName in member)
  • at least one procedure
  • at least one function
  • at least one trigger that acts like a CHECK constraint
  • at least one event
  • no table may have less than three rows (like the pubType table)
  • at least one table must have a minimum of ten rows

The point of using the techniques above is to make sure that your database meets all of the normal forms.

The data stored in your database is up to you. No two students in the course may have the same database design. For example, even if two students have a hockey database, the databases must have different data and structures.

Your database must be error-free. Note that if you set up an event, or a view and then delete the table(s) associated with that event or view, that event or view will have errors. Make sure you double check everything for correctness by the due date.

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_2

Step: 3

blur-text-image_3

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

Review major psychological issues of childhood.

Answered: 1 week ago