Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. tables

tables

Scheduled Pinned Locked Moved Database
databasecsharpasp-netbeta-testinghelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jds1207
    wrote on last edited by
    #1

    I am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines. Any feedback would help. Thanks! jds1207

    P C 2 Replies Last reply
    0
    • J jds1207

      I am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines. Any feedback would help. Thanks! jds1207

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I wouldn't go with creating 46 tables - as they will mostly be the same. Without more information to go on, I would look at creating this using the following structure:

      Department:
      ID (int autonumber PK)
      Name (NVarChar(100))

      Rating:
      ID (int autonumber PK)
      Score (int)
      RatingTypeID (int fk)
      DepartmentID (int fk)

      RatingType:
      ID (int autonumber PK)
      Description (NVarChar(100))

      Then, your RatingType table would hold the types, e.g. Quality. The Department table would hold details on the department, and the Rating table would be point to the Department and to the RatingType (it would also hold the score). In this way, you get a nice flexible structure where you can add rating types in the future. I hope this helps.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      • J jds1207

        I am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines. Any feedback would help. Thanks! jds1207

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Wow - you cross posted half the site. How annoying....

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups