Results 1 to 4 of 4

Thread: Database ERDs

Hybrid View

  1. #1
    Join Date
    Oct 2018
    Posts
    3

    Database ERDs

    Morning all,


    I have been given a small project at work to create a database from scratch which is basically to log incidents.

    I have identified the information which I need to record but am struggling to break this down into the required tables and attributes.

    Information to be stored.
    Unique Incident Number
    Year of incident
    Month of incident
    Day of incident (Mon, Tue etc)
    Time of incident
    Location of incident (there are 100 potential locations)
    Severity of incident (Low / Medium / High)

    All of the examples on 'how to create and ERD' always use the customer / order / product scenario which I understand, but i cant apply that model to this set of requirements.

    Once created, I need to be able to say where the most events have occurred / where no events have occurred / on what month or day do most events occur etc.

    Any help would be awesome....thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can create tables for incident, location and severity. All date / time could be one field.

  3. #3
    Join Date
    Oct 2018
    Posts
    3
    Slide1.JPG

    I have amended my schema diagram to create 2 tables.
    I know what data types and values I need to set but im not quite sure how to set them.
    In particular how do I set it so that only 'x', 'y' or 'z' can be entered?

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can create constraints on each column to limit the type of value. The physical model depends on the type of database system you are using.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •