Which apprach is better to to introduce an ID field or combine other fields

I have the following problems when i am designing my database for an online exam system:-
1.     I have a question table and answer table; where each question contains many answers and each answer have one question.
Now i have two approaches for designing the answer table, either by having:-
Answer_Id (PK),
Answer_Description,
Is_right.
Question_ID (FK)
Or
Answer_description
Is_right.
Question_ID (FK)
Having PK (Question_ID & Answer_description).
2.     Same issue applies for this scenario; I have an article table and a comment table, where each article can have many comments and each comment can belong to an article.
Now i have two approaches for designing comment table, either by having:-
Comment_ID (PK)
article_ID (FK)
Comment_Desc
Created_BY
Created_time
Or
article_ID (FK)
Comment_Desc
Created_BY
Created_time
Having PK(Created_BY & Created_Date), since it s not possible to be able provide two comment at the same time!by the same user!!
So is it better to introduce the ID field for both (comment & answers) tables or having my PK by combining the available columns
Thanks in advance for any help.

Re: creating different tables that represets different question types
Re: Implementing a varchar multi-valued attribute for my customer table
How many more variations do you plan on posting?

Similar Messages

  • I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    Why do you need a expensive MacBook Pro?
    Your attending high school and unless everyone else is rich also your likely going to be a target by the more poorer students for theft or damage to the machine.
    You could keep it home, but if you need it for class then your exposed again.
    Also at that age your not very careful yet, a MacBook Pro is a expensive and easily damaged machine.
    Unless your made of money and so are others at your school, I would recommned a low profile, just does the job cheap Windows PC.
    If it dies, gets lost, stolen or damaged because of your inexperince handling senstivie electronics then it's no big deal.
    You can buy a Mac later on when your sure you have a need for it, currently there isn't much advantage of owning a Mac compared to a PC, they do just about the same things now, one just looks prettier than the other.
    Since 95% of the world uses Windows PC's your going to have to install Windows on the Mac in order to keep your skills up there or be unemployed, so it's a extra headache and expense.
    good luck

  • Which browser is better to use as an option to Safari and how do you download it?

    Which browser is better to use as an option to Safari and how do you safely download it? Thanks

    I use Firefox when a site doesn't work well with Safari. Some people like Google's Chrome, but I find it too instrusive and do not trust Google's security. You can download Firefox from firefox.com.
    Regards.

  • I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better.Thanks

    I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better?.Thanks

    clintonfrombirmingham Your information is not correct.
    http://kb.sandisk.com/app/answers/detail/a_id/8142/~/difference-between-sata-i,- sata-ii-and-sata-iii
    I have a sata II samsung 5400 rpm and i am only able to transfer at 85 read right speed.
    On my main drive sata III ocz agility 3 ssd i get 120 mb read and 180 write.
    Neither of these come close to the 300 mb promised. So it wont matter if he got sata II or III
    The speed came from Blackmagic Disk Speed Test

  • Which solution for better perfomance?

    I'm writing java application based on XML. This application have to store very large XML file into DB (XML file is about 1000MB large). My solution is to divide it into smaller (100MB) parts (because of memory resources) and store it in DB. I have one XMLType table based on object-relational storage (so at the end there will be 10 rows each of 100MB size).
    XML file looks like:
    <students>
    <student id="1">
    ...// 5 nested elements or collections of elements
    </student>
    <student id="2">
    </student>
    <student id="3">
    </student>
    </students>
    </students>
    Now I need to get java object Student which correponds to <student>element. My solution is to select whole <student> element and use JAXB to convert it to Java object. While solving a problem with selecting <student> element (just in case you know a solution for my another problem: How to select specific element from a XML document using JDBC? another question raised in my mind.
    Which solution has better performance when I don't need to select relational data but I'm interested in xml fragment?
    1) Use object-relational storage
    2) Use CLOB storage
    As I figured out object-relational storage is better for selecting data like student name. But is it also better when I need whole xml fragment?
    Isn't my solution completely wrong? I'm quite a newbie in XML DB so it's possible that I missed better solution.
    Thanks for any advice

    I don't know which version you have regarding 11g, but probably in this case I would go for a table with a XMLType Binary XML column. To make xpath and other statements perform use Structured or Unstructured XMLIndexes to support your queries. The following has worked for far smaller XML documents but the millions we used were good for a total of >> 1 TB total storage size...
    CREATE TABLE XMLTEST_DATA
    (    "ID" NUMBER(15,0),
          "DOC" "SYS"."XMLTYPE"
    ) SEGMENT CREATION IMMEDIATE
    NOCOMPRESS NOLOGGING
    TABLESPACE "XML_DATA"
    XMLTYPE COLUMN "DOC" STORE AS SECUREFILE BINARY XML 
    (TABLESPACE "XML_DATA"
      NOCOMPRESS  KEEP_DUPLICATES)
    -- XMLSCHEMA "http://www.XMLTEST.com/Schema1.0.xsd"
    --  ELEMENT "RECORD" 
    DISALLOW NONSCHEMA
    PARTITION BY RANGE(id)
    (PARTITION XMLTEST_DATA_PART_01 VALUES LESS THAN  (100000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_02 VALUES LESS THAN  (200000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_03 VALUES LESS THAN  (300000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_04 VALUES LESS THAN  (400000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_05 VALUES LESS THAN  (500000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_06 VALUES LESS THAN  (600000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_07 VALUES LESS THAN  (700000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_08 VALUES LESS THAN  (800000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_09 VALUES LESS THAN  (900000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION XMLTEST_DATA_PART_MAX VALUES LESS THAN  (MAXVALUE) TABLESPACE "XML_DATA" NOCOMPRESS
    CREATE INDEX test_xmlindex on XMLTEST_data (doc) indextype is xdb.xmlindex
    LOCAL
    parameters ('GROUP PARENTINFO_GROUP
                 XMLTable test_cnt_tab_ParentInfo
                ''/RECORD/ParentInfo''
                COLUMNS
                 GroupingID01 VARCHAR2(4000) PATH ''Parent/GroupingID'',
                 GroupingID02 VARCHAR2(4000) PATH ''Parent/Parent/GroupingID''
              ');

  • I would like to buy am Ipad for my nephew. Which one is better to play games, ipad or ipad mini

    I would like to buy an ipad for my nephew. Which one is better, ipad or ipad mini? He wants to play games, and put lots of app.

    Probably the full iPad, because it has a better graphics card. The larger screen helps too.

  • Which is a better bacikup software?

    I'm puzzled as to which is a better backup software:
    Carbon Copy Cloner or
    Super Duper which says it preserves data that would be lost during something called a roll back.
    I don't what that means;
    I am backing up to a firewire external drive, is that a good choice?
    Need advice
    Thanks

    I read in SuperDuper that it completely erases your drive and makes a duplicate of the HD. There are documents that I remove from my HD but would like to keep on the backup disc just in case. I may need them in the future. According to SuperDuper they would be erased because they no longer reside on the main HD. I'm looking to update new and changed items but not delete items that no longer reside on the main HD, am I making myself clear?
    Yes, the free version of SuperDuper! will always erase the target drive and clone the entire source disk again. The paid version will do what you want. What I have in quotes below is directly from the registered version's menus.
    1) Smart Update. "Smart Update will copy and erase what's needed to make the target drive identical to your selections from the source. The result will mimic "Erase, then copy", but will typically take a fraction of the time."
    2) Copy newer files. "Any selected files already on the target drive that are older than the equivalent file on the source will be replaced. New files will also be copied; no files will be removed."
    3) Copy different files. "Any selected files already on the target drive that are different (in date, size or attributes), than the same file on the source will be replaced. New files will also be copied; no files will be removed."

  • c:redirect VS RequestDispatcher -WHICH ONE IS BETTER TO USE?

    WHENVER WE WANT TO ACCESS FILES FROM OHTER APPLICATIONS,WHICH ONE IS BETTER TO USE,<c:redirect> OR
    RequestDispatcher

    Please stop shouting. It is considered rude.

  • , c:redirect OR RequestDispatcher -which one is better to use

    WHENVER WE WANT TO ACCESS FILES FROM OHTER APPLICATIONS,WHICH ONE IS BETTER TO USE,<c:redirect> OR
    RequestDispatcher

    <c:redirect> is the JSTL equivalent of the sendRedirect() method of javax.servlet.http.HttpServletResponse.
    Please see here:
    http://forum.java.sun.com/thread.jspa?forumID=45&threadID=405398 or search the forums for "RequestDispatcher redirect"

  • Which cover is better whether smart cover or smart case

    which cover is better whether smart cover or smart case

    It is really a choice to personal preference.
    The Smart Cover provides some protection for the front of the device but no side/back protected. However, the Smart Cover is much more easier to use in my opinion and makes the device feel better.
    The Smart Case provides all around protection for your iPad and is worth getting. It is not as tough as some of the crazy cases out their that like protect from 100ft drops lol.
    So, just go to the Apple store and talk to a representative and he/she will help you out!
    - Sean

  • Which is a better performer, the macbook air or the mac mini?

    Which one performs better, the late 2013 macbook air (standard configuration: 4GB RAM, dual core i5 1,3 Ghz CPU) or the mac mini core quad core i7, 4GB RAM with a regular hard disc?

    LowLuster 
    No Air model can be as fast as a Mini with a quad core i7 CPU. Can't happen.
    I didnt solicit your opinion, and it IS a fact, .....skilled users here on this board will and DO TELL other users OFTEN that:
    "outside of processor core use (video/ photo etc.) you will NOT NOTICE ANY DIFFERENCE on X computer vs. slower Y computer"
    I have a 8 month old QUAD core Mac Mini and it is , as I said above "noticeably not ONE BIT" faster than my current 2013 macbook Air with 8gig.
    My quad core came with 4gig of RAM as I recall, I immediately tossed in 16gig.
    Notice the word "noticeably"
    Your subjective hyperbole aside, you are wrong......., those above yourself and myself (point wise,...as Ogel has stated, Clinton has stated, and others) state this fact very often regarding ---"outside of processor core use (video/ photo etc.) you will NOT NOTICE ANY DIFFERENCE on X computer vs. slower Y computer"
    Its not my opinion, its a fact, namely additionally that I stated "noticeably"   - "my quad core mac mini on MOST EVERYTHING (which is most things since 'most things' are NOT photo and video editing) is not "noticeably" ONE BIT faster than my Macbook Air.
    "most things" people do (most people) on their computer does NOT involve photo and video editing (photoshop pro, final cut pro etc etc)
    This is a fact, that AS SUCH most people WILL NOT notice any difference in general computer use between a quad core mac mini (for example) and a entry level macbook Air. (SSD vs. HD speeds aside).       Nobody is going to notice faster youtube, or Word use, or websurfing, Acrobat Pro, Quicktime play, general APPS that havent changed much in 7 years.
    Dont curse on these family boards please, its uncouth.
    Peace

  • Which one is better static inner classes or inheritance ?

    Hi,
    Consider following scenario,
    Class A does some database related work and Class B,C,D has more specific tasks for specific databases. For now B,C,D has more static information like driver name etc.
    1. I can either make class B,C,D as static inner classes OR
    2. classes B,C,D can extend class A.
    Case 1. makes it more flexible, if in future, B,C,D needs more than static methods.
    Case 2. can avoid complexity and cost of instantiating differnt objects based on differnt scenarios.
    Which approache is better in both ?
    Thanks

    Yes, I have seen abstract factory pattern , rather I have implemeted it at one place and in case 1. using abstract factory pattern is the way to initialize all classes.But my question is if I make all subclasses as a static inner classes, will it be better or efficient approach as compare to abstract factory pattern.Because Abstract factory patter adds more complications in code in turn it provides more flexibility.

  • Shutdown or Sleep, which one is better??

    I usually use my Mac Mini about 3 hours a day. At the end of the day, should I shutdown the machine or simply put it in sleep mode? Which one is better? What is the difference?
    Mac Mini   Mac OS X (10.4.6)  

    791/3237
    Hi Snawman,
    I agree with the others. In your case, better shut it down for saving energy.
    "Which one is better? What is the difference?":
    - Sleep allows to very quickly resume any task that was running. Leave all applications, documents etc open, they'll just be here at the same place, in the same state, as when you left your computer.
    It's just a matter of quickly going back to work, not having to retype some websites login passwords for example, etc.
    - On the wear and tear point of view, the difference is so small, your Mini will be obsolete and replaced with a newer Mac, far before something breaks down just because of to many cold boots!
    Yes, the most demanding task for a computer's hardware (and probably OS too), is a cold boot.
    Sleep, instead of Shutdown, keeps your computer components from a lot of temperature fluctuations, and the hard disk too just spins down, instead of completely setting itself down, then up again from scratch (and cold).
    Again,
    these differences exist, but they are not so important that you would take them into account and change your energy saving habits.
    - Macs are well designed to cope with many different kinds of users/usages.
    "About running yourself the nightly automatic maintenance":
    In case you didn't know already about this: yes, just open Terminal and paste this command
    sudo periodic daily weekly monthly
    once or twice a month.
    In order to make sure all three maintenance tasks run until the end, after you entered your admin password and hit Return, just leave Terminal open like 15 minutes or so (until you see its prompt again).
    There is no hurry to quit it, as the maintenance runs in the background: Just use your computer in the meanwhile.
    Enjoy your Mac!
    Axl

  • Which IDE is better Jdev or Eclipse for BPEL

    Hi All,
    Which Tool is better to use for BPEL - Eclipse or Jdeveloper.
    Thanking You,
    Rakesh.

    BalaTTPL wrote:
    for j2ee netbeans is best. if u use ecplise(wtp) it create only web.xml.Maybe you did something wrong :)
    compare with ecplise netbeans is best it have
    1) xml gui tool, verification and validation
    2) no need to create web.xml
    3) debug also easy and user friendly.Eclipse also offers this.
    After all, just install them both and try them both out. If you want my opinion: Eclipse Europa for Java EE or IntelliJ IDEA.

  • I have an AirPort Extreme time capsule . I need to extend my wifi network range. Which devise is better ?? Airport express or AirPort Extreme ??

    I have an AirPort Extreme time capsule . I need to extend my wifi network range. Which devise is better ?? Airport express or AirPort Extreme ??

    Since you have the new Time Capsule, then you will need a new AirPort Extreme to match the performance capabilities of the Time Capsule.
    If best quality is preferred, you will need to connect the Time Capsule and AirPort Extreme using a wired Ethernet connection between the devices. The advantage of doing it this way is that you can locate the AirPort Extreme exactly where it is needed...and there will be no loss of signal through the Ethernet cable.
    A wireless connection will result in a significant drop in performance, but it might be OK for your uses, if you want to try it that way first to see if the performance is acceptable.
    It is really important that the AirPort Extreme be located where it can receive a strong wireless signal from the Time Capsule.
    A line-of-sight relationship between the Time Capsule and AirPort Extreme would be the goal, with the AirPort Extreme located about half way between the Time Capsule and the general area where you need more wireless signal coverage.

Maybe you are looking for

  • I can sign in to AppleSupport on my iMac, but today I cannot sign in via iPad

    I have been using both iMac and iPad to access Apple Support... but today I couldn't sign in with either. I finally changed password and now I can sign in using my iMac, but when I try to sign in with iPad, I get message "we do not recognize an accou

  • XI file adapter polling faster than poll interval

    Hi, We are facing a issue with the file adapter/authorization of the FTPUSER. We FTP a server and pick up a file from a particular folder. My polling interval is 2 minutes My retry interval is space. Processing mode : ARCHIVE We are archiving it on a

  • How do I set my iPod's alarm volume separate from that of the other sounds?

    First of all, I tried to post this to the iOS Apps community, but there doesn't seem to be one for the Clock app. I wake up by the alarm feature on my iPod Touch, but sometimes the volume is turned down super low because throughout the day I have the

  • New gl and reporting

    hi gurus, i have configured all steps required for new gl. now transactions are posting, suppose at a particular day i want to see p&l and balance sheet of a profit center then how can i do that. thanks & Regards, manoj Moderator: Please, avoid askin

  • How to create an user privileges in java

    Hello, I need help! I'm now creating a system based in Java which I need to create a user privilege for security purposes. I need to create 3 kinds of users, 1st is the administrator and the 2nd is a viewer access which can only view the software but