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. how to create a database if data is given?

how to create a database if data is given?

Scheduled Pinned Locked Moved Database
databasetutorialquestion
19 Posts 2 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.
  • U User 11236637

    i am going to use php for the database connectivity.

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #8

    Good, that makes the UI nice and simple, and not much mucking around with forms. Just a few input-fields, a submit button, and a result. Another benefit is that one could demo it on a smartphone. ..but working on that makes more sense once you have the data in the database. Did you create a database on your database-server yet? If yes, then you'd need to create the table to hold the data. If you post the top two lines from your example CSV, someone might help with the create table or the select-command :rolleyes:

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

    U 1 Reply Last reply
    0
    • L Lost User

      Good, that makes the UI nice and simple, and not much mucking around with forms. Just a few input-fields, a submit button, and a result. Another benefit is that one could demo it on a smartphone. ..but working on that makes more sense once you have the data in the database. Did you create a database on your database-server yet? If yes, then you'd need to create the table to hold the data. If you post the top two lines from your example CSV, someone might help with the create table or the select-command :rolleyes:

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      U Offline
      U Offline
      User 11236637
      wrote on last edited by
      #9

      will i have to load all the files in a single table or mutiple table?i haven't created a database yet.

      L 1 Reply Last reply
      0
      • U User 11236637

        will i have to load all the files in a single table or mutiple table?i haven't created a database yet.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #10

        That will depend on the layout of your CSV files. If there's no difference in layout, then it might be done using a single table. I can imagine calculating the popularity as an occurence of the name between a set of dates, compared to 'any' other name on the same set of dates. ..that is, of the same gender, of course. A female-baby name does not compete with any of the male-baby names.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        U 1 Reply Last reply
        0
        • L Lost User

          That will depend on the layout of your CSV files. If there's no difference in layout, then it might be done using a single table. I can imagine calculating the popularity as an occurence of the name between a set of dates, compared to 'any' other name on the same set of dates. ..that is, of the same gender, of course. A female-baby name does not compete with any of the male-baby names.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          U Offline
          U Offline
          User 11236637
          wrote on last edited by
          #11

          [^]https://drive.google.com/file/d/0Bz4F2FWI2Rx9S0tWUlN6dy1pTUU/view[^] this is the link to the data that has been provided to be entered in the database.please have a look at it and tell me if it will work in a single table.

          L 2 Replies Last reply
          0
          • U User 11236637

            [^]https://drive.google.com/file/d/0Bz4F2FWI2Rx9S0tWUlN6dy1pTUU/view[^] this is the link to the data that has been provided to be entered in the database.please have a look at it and tell me if it will work in a single table.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #12

            I cannot download the zip, just list its contents. Means I also cannot view the content of these files. Still, by the naming-pattern of the file, I'd guess that all files have the same layout and that a single table would do.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            U 1 Reply Last reply
            0
            • U User 11236637

              [^]https://drive.google.com/file/d/0Bz4F2FWI2Rx9S0tWUlN6dy1pTUU/view[^] this is the link to the data that has been provided to be entered in the database.please have a look at it and tell me if it will work in a single table.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #13

              My apologies, it appears my comments are caught in the spam-filter. Answer was roughly "yes".

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              1 Reply Last reply
              0
              • L Lost User

                I cannot download the zip, just list its contents. Means I also cannot view the content of these files. Still, by the naming-pattern of the file, I'd guess that all files have the same layout and that a single table would do.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                U Offline
                U Offline
                User 11236637
                wrote on last edited by
                #14

                yeah the layout is same,but i will have to add two columns gender and year to specify the gender and year right?

                L 1 Reply Last reply
                0
                • U User 11236637

                  yeah the layout is same,but i will have to add two columns gender and year to specify the gender and year right?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #15

                  If they are not in the original data as columns, then yes, please do; it will make creating a selection-query a lot easier - you'll need them for calculating popularity :)

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                  U 1 Reply Last reply
                  0
                  • L Lost User

                    If they are not in the original data as columns, then yes, please do; it will make creating a selection-query a lot easier - you'll need them for calculating popularity :)

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                    U Offline
                    U Offline
                    User 11236637
                    wrote on last edited by
                    #16

                    Thanks for your help.I will try and implement it and if i have any doubts i'l get back to you.

                    L 1 Reply Last reply
                    0
                    • U User 11236637

                      Thanks for your help.I will try and implement it and if i have any doubts i'l get back to you.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #17

                      You're welcome :)

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                      U 1 Reply Last reply
                      0
                      • L Lost User

                        You're welcome :)

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                        U Offline
                        U Offline
                        User 11236637
                        wrote on last edited by
                        #18

                        i have problem with this code can you plzz check for errors.I was working on live search. <html> <head> <title>Ajax Search Box using PHP and MySQL</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="typeahead.min.js"></script> <script > $(document).ready(function(){ $('input.typeahead').typeahead({ name: 'typeahead', remote: 'search.php?key=%QUERY', limit : 10 }); }); </script> .bs-example{ font-family: sans-serif; position: relative; margin: 50px; } .typeahead, .tt-query, .tt-hint { border: 2px solid #CCCCCC; border-radius: 8px; font-size: 24px; height: 30px; line-height: 30px; outline: medium none; padding: 8px 12px; width: 396px; } .typeahead { background-color: #FFFFFF; } .typeahead:focus { border: 2px solid #0097CF; } .tt-query { box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; } .tt-hint { color: #999999; } .tt-dropdown-menu { background-color: #FFFFFF; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 8px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); margin-top: 12px; padding: 8px 0; width: 422px; } .tt-suggestion { font-size: 24px; line-height: 24px; padding: 3px 20px; } .tt-suggestion.tt-is-under-cursor { background-color: #0097CF; color: #FFFFFF; } .tt-suggestion p { margin: 0; } </head> <body>

                        Ajax Search Box using Node and MySQL Codeforgeek Tutorial

                        <button type="button" class="btn btn-primary btn-lg">Visit Tutorial</button>

                        <input type="text" name="typeahead" class="typeahead tt-query" autocomplete="off" spellcheck="false" placeholder="Type your Query">

                        </body> </html>

                        L 1 Reply Last reply
                        0
                        • U User 11236637

                          i have problem with this code can you plzz check for errors.I was working on live search. <html> <head> <title>Ajax Search Box using PHP and MySQL</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="typeahead.min.js"></script> <script > $(document).ready(function(){ $('input.typeahead').typeahead({ name: 'typeahead', remote: 'search.php?key=%QUERY', limit : 10 }); }); </script> .bs-example{ font-family: sans-serif; position: relative; margin: 50px; } .typeahead, .tt-query, .tt-hint { border: 2px solid #CCCCCC; border-radius: 8px; font-size: 24px; height: 30px; line-height: 30px; outline: medium none; padding: 8px 12px; width: 396px; } .typeahead { background-color: #FFFFFF; } .typeahead:focus { border: 2px solid #0097CF; } .tt-query { box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; } .tt-hint { color: #999999; } .tt-dropdown-menu { background-color: #FFFFFF; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 8px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); margin-top: 12px; padding: 8px 0; width: 422px; } .tt-suggestion { font-size: 24px; line-height: 24px; padding: 3px 20px; } .tt-suggestion.tt-is-under-cursor { background-color: #0097CF; color: #FFFFFF; } .tt-suggestion p { margin: 0; } </head> <body>

                          Ajax Search Box using Node and MySQL Codeforgeek Tutorial

                          <button type="button" class="btn btn-primary btn-lg">Visit Tutorial</button>

                          <input type="text" name="typeahead" class="typeahead tt-query" autocomplete="off" spellcheck="false" placeholder="Type your Query">

                          </body> </html>

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #19

                          I'm not that home in ASP, not a language I work with very often; you might have more success in the ASP.NET forum.

                          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                          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