Question

I've created the survey form but I don't know how to continue doing the database... Can someone each me? Anyway, Here's my code:

<tr>
                <td class="auto-style2">5) Would you share our website to your friends?</td>
                <td>
                    <asp:RadioButtonList ID="rbl5" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" RepeatLayout="Flow">
                        <asp:ListItem>Yes</asp:ListItem>
                        <asp:ListItem>No</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="auto-style2">6) Any comments or suggestions?</td>
                <td>
                    <asp:TextBox ID="tbComment" runat="server" Height="182px" TextMode="MultiLine" Width="271px"></asp:TextBox>
                    <br />
                    <br />
                    <br />
                    <input type="button" onclick="btnSubmit_Click()" value="Submit" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnReset" runat="server" OnClick="btnReset_Click" Text="Reset" />
                </td>
            </tr>
        </table>

    </div>
    </form>

As you noticed, I used radiobuttonlist and comment box. These are the reasons why I'm having problem to create the database... Please teach me...I only know how to create tables for database...

And the database might be something like this...

This is the QUESTION Table:

CREATE TABLE [dbo].[Question]
(
    [Id] INT NOT NULL PRIMARY KEY, 
    [Question] NCHAR(10) NULL, 
    [Options] NCHAR(10) NULL
)

This is the ANSWERS Table:

CREATE TABLE [dbo].[Answers]
(
    [Id] INT NOT NULL PRIMARY KEY, 
    [QuestionId] NCHAR(10) NULL, 
    [Answers] NCHAR(10) NULL
)

And I'm also not sure about the NCHAR(10) ... So this is how bad I am in programming. Please teach me.

Was it helpful?

Solution

If you don't have experience with SQL, you could try parse.com, just to get something up and running quick.

You'll have to read through their docs, they also have tutorials and a quickstart explanation.

I would still recommend learning about SQL, simply because you don't really need to know that much to get going.

OTHER TIPS

you need to use database servers like sql or ms-sql or oracle or other database engines unless u are asking query to create the database, which i assume not, as there is no query or other related tags in your question

If you have access to a SQL Server (SQLExpress, LocalDB, Full MSSQL) and you are able to make use of EF (Entity Framework), then you can use Code First to build your Database from your domain models.

EF Code First Tutorial

Assuming you're running Windows, SQLExpress and LocalDB should already be installed on your PC, if not they can be downloaded here. Either of these will suffice for what you are looking to do and both are free. You could alternatively pay for a fully featured MSSQL license, however, this might be overkill for you currently.

All of these will happily run on your local machine, if however you are looking to deploy your application to the Internet, you may want to considering some sort of hosting option unless you are comfortable with doing so yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top