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.
  • L Lost User

    Oracle is a good choice; now you'd first need a way to get that data in Oracle. You could type in a lot of insert-statements, but there's probably a tool out there that can upload the CSV to an existing database. Next, someone will have to create a UI (I'd recommend .NET) and create a way for the user to set named options. They can all be translated to a change in the [SELECT](https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10002.htm)[[^](https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10002.htm "New Window")] statement that has to be generated. The select-query is a nice piece of homework; the example actually looks as if each option is there to introduce another part of the select-command. I'd recommend focussing on that before you try to 'add' the popularity-indication. You'd need to filter on both gender and year in the WHERE statement, limit your results, and dynamically build a query from code. When is the deadline?

    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
    #5

    deadline is 1st november,and everything you said after 2nd paragraph was over my head.ps-I am new to database.

    L 1 Reply Last reply
    0
    • U User 11236637

      deadline is 1st november,and everything you said after 2nd paragraph was over my head.ps-I am new to database.

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

      Roughly means you have a week. In that week you need to build a UI and learn some basic SQL. Do you feel like game? :) What application are you using to interact with the database? I assume you've already got it installed and got a tool to access it. Day 1-2: create database, table and upload data Day 3-4: create UI Day 5-6: execute basic select command and displaying result From a bit of Googling I take it that there's a command called "sqlldr" that can be used to import a CSV. There's a video here[^], which makes it look easy, but I imagine the three different files required to execute it all can be a little bit confusing. There's a FAQ[^] and more resources, and you can post questions on how to create a specific command here. If you don't have a manual on SQL on Oracle, I suggest you get one :)

      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

        Roughly means you have a week. In that week you need to build a UI and learn some basic SQL. Do you feel like game? :) What application are you using to interact with the database? I assume you've already got it installed and got a tool to access it. Day 1-2: create database, table and upload data Day 3-4: create UI Day 5-6: execute basic select command and displaying result From a bit of Googling I take it that there's a command called "sqlldr" that can be used to import a CSV. There's a video here[^], which makes it look easy, but I imagine the three different files required to execute it all can be a little bit confusing. There's a FAQ[^] and more resources, and you can post questions on how to create a specific command here. If you don't have a manual on SQL on Oracle, I suggest you get one :)

        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
        #7

        i am going to use php for the database connectivity.

        L 1 Reply Last reply
        0
        • 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