Which Is Better:Create The Database Manually Or As a Part Of  Your Code?

hi everybody
i just want to know people when you creating a JDBC Application
and introduce the program to the user to deal with
do you create the database through the database client like phpmyadmin for mysql
or by using query in your program?if so when you use the query in your flow of code?
or you restore an empty database backup file enclosed in the setup directory?
i just want to know what is the best design way when creating the database on the end user machine?

First_knight wrote:
and how do you deal with user installing new operating system,or formatting the hard disk?
you tell him to take backup of the database then restore it again,right?yes. How else is he going to preserve his data?
sheesh...
In real applications the database is just about always maintained separately from the application and contains a lot of logic and structures that you can't create using Hibernate, JPA, or whatever.
It's also almost always a database that's been in existence for a long time, well before you ever were asked to write that Java application to talk to it.
Autogeneration of tables is nice for rapid prototyping or for demo purposes where it allows you to install the application more easily, but that's about it.

Similar Messages

  • Creating the database manually

    Hi,
    I have installed oracle database 10g in OEL5
    Now i need to create the database manually.
    How to create it,pls provide me some help

    Asif and Pavan are bad guys na? One has given doc link and another is saying for search in google.... Oaf now you have to read the dos/google and then create database command.... Really its very hard and time consuming task to learn oracle right? Can'nt they give you a direct copy paste steps, so that you may learn create database without going into docs?
    @Pavan and Asif,
    Just kidding with OP.... :)

  • Error when I create the database

    I install the peopletools 8.49 for Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and my operating system is Microsoft Windows Server 2003 Enterprise Edition Server Pack 1, v.1023.
    When I have installed the peopletools and the database, I modify the scripts in <PS_HOME>\scripts\nt and then change to <PS_HOME>\setup\PsMpDbInstall and double click setup.exe to run the database configuration wizard. All of the scripts are running correct, but the Data Mover is error. So I run the Data Mover manually. I create Data Mover import scripts and run it. It’s ok. Then I check the logs. I find the follow error:
    psadmin.log:
    ALTER TABLE SQLPLUS_PRODUCT_PROFILE ADD (LONG_VALUE LONG)
    ERROR at line 1:
    ORA-00942: table or view does not exist
    psdmtx.log:
    PSDMTX Error: signon
    verifyToolsVer.log:
    select TOOLSREL from PSSTATUS *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    sqlnet.log:
    Fatal NI connect error 12557, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cs.lab.net)(PORT=1521))(CONNECT_DATA=(SID=PSDB)(CID=(PROGRAM=C:\pt\bin\client\winx86\psdmtx.exe)(HOST=CS)(USER=Administrator))))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.1.0.5.0 - Production
    Time: 19-MAY-2009 15:33:27
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12557
    TNS-12557: TNS:protocol adapter not loadable
    ns secondary err code: 12560
    nt main err code: 527
    TNS-00527: Protocol Adapter not loadable
    nt secondary err code: 0
    nt OS err code: 0
    Then I run version application engine program:
    C:\Documents and Settings\Administrator>C:\pt\bin\client\winx86\psae.exe -CD PSD
    B -CT ORACLE -CO SYSADM -CP SYSADM -R INSTALL -AI VERSION
    Message Set Number: 0
    Message Number: 0
    Message Reason: Invalid User ID and password for signon. (0,0)
    Error in sign on
    PSDB: database name
    SYSADM: peoplesoft owner id
    How can I resolve it?

    I create the database manually too. The errors are the same. I can login in data mover by SYSADM user or people user and the database and listener is running. However, I run version application engine program:
    C:\Documents and Settings\Administrator>C:\pt\bin\client\winx86\psae.exe -CD PSDB -CT ORACLE -CO SYSADM -CP SYSADM -R INSTALL -AI VERSION
    Message Set Number: 0
    Message Number: 0
    Message Reason: Invalid User ID and password for signon. (0,0)
    Error in sign on
    I change the user to try, it’s the same.
    Edited by: hzg on May 21, 2009 9:38 AM

  • Entity Framework doesn't create the database in SQL Server Management 2012, instead it just creates in (localdb)\v11.0 How to fix it?

    Hi, I'm Begginer in Entity Framework. Then I'm having some problems.
    I created my entities and I give Save Changes. (Ok)
    Then, I Tried to Connect with the database through Server Explorer, if I use the instance of the SQL Server Management Studio 2012(PC-PAULO\INSTANCIAPJ) as Server Name, the database doesn't appears but, if I use the the instance (localdb)\v11.0 the dabase
    appears.
    How to change the save to the SQL Server Management Studio 2012, I don't know where this (localDB)\v11.0 saves.
    Help-me Thank you :D

    Hello PauloJos,
    The code should be ok and it is really strange that the database is only created into the local database in your machine. I am wondering if it is related with the machine environment, could you please have a try with below demo on your machine which works
    on my side and if it is possible, please have a try to run your application on other machines to see if it works:
    class Program
    static void Main(string[] args)
    #region https://social.msdn.microsoft.com/Forums/en-US/00eff3c4-2336-4807-9212-e6f2a6c8812e/entity-framework-doesnt-create-the-database-in-sql-server-management-2012-instead-it-just-creates?forum=adodotnetentityframework
    using (CFDbContext db = new CFDbContext())
    db.Database.CreateIfNotExists();
    #endregion
    public class CFDbContext : DbContext
    public CFDbContext() : base("UltraFoda3") { }
    public DbSet<TestOne> TestOnes { get; set; }
    public class TestOne
    public int ID { get; set; }
    public string Name { get; set; }
    Config file is similar:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
    <parameter value="v11.0" />
    </parameters>
    </defaultConnectionFactory>
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <connectionStrings>
    <add name="UltraFoda3" connectionString="Data Source=YourServer;Initial Catalog=UltraFoda3;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • When in transport, which is better have the MBP shut down or sleep mode?

    when in transport, which is better have the MBP shut down or in sleep mode?

    Read the user manual that came w/your computer.  Personally, I shut down when transporting.  
    It all comes down to personal preference.  "Different Strokes For Different Folks"

  • You do not have enough free disk space to create the database

    Hello,
    When I try to create a database, I have this error message:
    You do not have enough free disk space to create the database. You need at least 1428480 kB on /opt/oracle, you have only 1179648 kB available, please alocate more free disk space.*
    When I run *# df -h* I have:
    /dev/mapper/VolGroup00-LogVol09
    5.7G 4.3G 1.2G 79% /opt/oracle
    and
    /dev/mapper/VolGroup00-LogVol10
    486G 542G 262G 68% /oracle_data
    and with vgdisplay I have:
    Alloc PE / Size 29772 / 930.38
    Free PE / Size 0 / 0
    My info is:
    Redhat Linux server release 5.8
    Oracle 11.2.0
    I do not know how to solve this.
    Please help me
    Thank you
    Frank

    976847 wrote:
    Please... like reading exercise, read again my last post and you will understand the information.
    1179648 kB available space is comparable with 1.2GB. Both are the available space.
    Thank you for your help.From the error you reported in your original post
    You do not have enough free disk space to create the database. You need at least <font color="red" size="4">1428480 kB</font> on <font color="red" size="4">/opt/oracle</font>, you have only <font color="red" size="4">1179648 kB</font> available, please alocate more free disk space.
    SQL> select 1179648 i_have, 1428480 oracle_needs,
      2         1179648 - 1428480 i_am_short
      3  from dual;
        I_HAVE ORACLE_NEEDS I_AM_SHORT
       1179648      1428480    -248832So, yes, both numbers report the available space in slightly different terms, but what you need to be concerned about is how much Oracle thinks you neeed to have, which is <font color="red" size="4">more</font> than you actually have on /opt/oracle.
    John

  • Paraller Query Server Error while creating the database using DBCA on UNIX

    Hi All,
    I am try to create the database on UNIX PLATFORM database 11g R1.
    At the end of database creation using DBCA i got the errors:
    ORA-12801:error signaled in parallel query server P077
    ORA-00018: maximun number of sessions exceeded
    ORA-06512:at"SYS.UTL_RECOMP",line 760
    ORA-06512:at"SYS.UTL_RECOMP",line 773
    ORA-06512:at line 1
    Please suggest what can i do to remove this issue.
    Regards
    Girish Sharma

    user12104101 wrote:
    Hi All,
    I am try to create the database on UNIX PLATFORM database 11g R1.
    At the end of database creation using DBCA i got the errors:
    ORA-12801:error signaled in parallel query server P077
    ORA-00018: maximun number of sessions exceeded
    ORA-06512:at"SYS.UTL_RECOMP",line 760
    ORA-06512:at"SYS.UTL_RECOMP",line 773
    ORA-06512:at line 1
    Please suggest what can i do to remove this issue.
    Regards
    Girish SharmaIncrease value of SESSIONS(also processes) parameter as
    sqlplus "/as sysdba"
    show parameter sessions
    alter system set sessions =<new big value> scope=spfile;
    shutdown immediate;
    startup;

  • Error: SNAP_ADT does not exist in the database - manual check required

    Hello Friends,
    We are  performing an upgrade+migration to HDB using the DMO option(Oracle to HANA).
    We are getting below error in the phase MAIN_SHDCRE/SUBMOD_SHDDBCLONE/DBCLONE!
    Also find the output of SE11 & SE14 attached.
    SE14->
    Please help us with the manual check.
    Regards
    Sury

    Hi Sury,
    In regards to the error below:
    1EETGCLN Error: SNAP_ADT does not exist in the database -> manual check
    required
    1EETGCLN SNAP_ADT
    1EETGCLN Table does not exist
    Could you please try to activate the following tables via SE11?
    -  SNAP_ADT
    Once they are activated, Could you please repeat the phase and update the result?
    Thanks and Regards,
    James Wong
    Follow us:
    SAP System Upgrade & Update Troubleshooting Wiki Space.
    SAP Product Support Twitter  ( Hashtag: #NWUPGRADE)

  • Is it better for your battery if you let it run down all the way and then charge it? Or to charge it whenever you have the opportunity?  Which is better for the life of the battery?

    I was wondering it the life of the battery would last longer if you let the battery run down all the way and then charge it? Or to charge it whenever you have the opportunity even if it doesn't have a low battery?  Which is better for the life of the battery and prolong the life of the battery?

    I've had a iPhone 4s since March 2012, and it's battery is pretty useless now.  I was using the app Battery Doctor (Battery Saver, Battery Life) by Beijing Kingsoft Internet Security software, which encourages the user to charge more often, whenever battery life drops below 100% full and greater than 20% full, and gives ratings according to the number of full, partial &amp; overcharges done, but I'm concerned that charging like that actually results in worse battery life??
    I now have an new iPhone 5 and don't want the battery to only last as short as the last one did
    Any advice/comments please

  • Required the details of jar files which is loaded in the database

    Hi
    We are having a 10g database which is running under Solaris machine. There are lot of .jar files which are loaded into the database. I would like to know how to find those .jar file details atlease the name of the files which are loaded in the database. Is there any view for this.
    I couldnt find anything from the Java option in TOAD
    Please provide a solution.
    Thanks
    SHIYAS M

    From 11g onwards, you have
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> desc javajar$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    PATH VARCHAR2(4000)
    CONTENTS BLOB
    SQL> desc javajarobjects$
    Name Null? Type
    JARNAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    OBJNAME NOT NULL VARCHAR2(40)
    NAMESPACE NOT NULL NUMBER

  • Automating the installation process,creating the database, creating tables etc at the

    Hi,
    We have a requirement to install oracle 8.1.6 on solaris box. The whole installtion process should be automated. This process includes changing the kernel parameters, creating the oracle account as per the installation guide, configuring the logical volumes, creating the database as per OFA recommendations, creating tables etc. How can i do this with out any interaction from user. Can the Oracle software packager handle all these. Please Let me know ASAP.
    Thanks a bunch.

    Agata,
    The full retail should be white with a snow leopard on it but if you ordered from the on-line store you should be fine.  If it is having problems booting while holding the C key, try restarting the computer but this time hold the Option key.
    That will bring up a grey screen with the image of the Macintosh HD and an image of the CD.  Click the image of the CD and let it boot that way.
    Once booted, go through the install proceedure, choose language, etc.  Still using the same CD but let's see if for some reason it does not like the way it is being told to boot.
    Ralph

  • EJB newbie -- do i need to create the database?

    I know this may seem an odd question but do i need to create a database and create all the tables with commands such as: CREATE TABLE (...)? or will the deployment descriptor do that for me?
    clarkie

    if u are using entity beans there is no need to create database.
    u can make use of create function of the entity beans...if u are using bmp u need to write explicitly the code(sql code) for creating the database
    if u r using cmp u dont need to explicitly write the code for creating the table
    regards
    shanu

  • Re-create the database

    I need to re-create the database to solve the system tablespace fragmentation.
    Could some body tell me how to do it?
    Should I first recreate the system tablespace first? and then create the tablespace one by one?
    Could somebody help me out?
    Thanks

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by cs:
    I need to re-create the database to solve the system tablespace fragmentation.
    Could some body tell me how to do it?
    Should I first recreate the system tablespace first? and then create the tablespace one by one?
    Could somebody help me out?
    Thanks<HR></BLOCKQUOTE>
    null

  • When create the database...

    When it create the database...
    It has a error ORA-03113...
    What can I do on it??

    Have a look at the topic posted by John Smiley "If you're having problems ...".
    This explains how to fix your woes...

  • How to create the database schema from an existing TimesTen database ?

    Hello everybody,
    I'm a newbie to TimesTen database. Before doing complicated sql queries, I would like to obtain the database schema of TimesTen DB. I'm looking for a way to extract the schema of database (tables, keys, links between tables ...). When I was working on other db like postgreSQL, I was able to obtain the sql script of the database (for exemple, in order to re-create the database in an other server). Some software like PowerAMC was able to built the database model from these scripts.
    Do you know a way to obtain the same with TimesTen database ? Or with an other way ?
    Regards

    Hi,
    Take a look in the docs at ttSchema, this might do the trick.
    http://download.oracle.com/docs/cd/E13085_01/doc/timesten.1121/e13069/util.htm#autoId27
    Tim

Maybe you are looking for

  • Request for info regarding MAC address population in computer objects

      Hi, I am trying to determine how MAC address information is populated in computer objects. I had assumed initially that the hardware scan would be used, but observation shows this information to be obtained prior to any hardware inventory. I have l

  • H 470wbt not wishing to print complete photo grade pages

    Not sure if issue is printer or megapixels. (mp) I have had this printer for several years and  I have been using last couple years with a Sony Vaio running windows 7 When we take a vacation type trip, I shot digital pictures . .which I then print up

  • Photoshop album viewer

    I've been building up a database of my photos using photoshop elements and originally album) over the past few years - currently I'm using PS elements v4. I've got PS installed on my main PC with all the photos/catalogs stored on a NAS drive. I'm now

  • How can I get anti-aliased text?

    I create my bitmap and Graphics2D object as follows: BufferedImage img = new BufferedImage(devExtX, devExtY, BufferedImage.TYPE_INT_ARGB); graphic = (Graphics2D) img.getGraphics(); graphic.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHi

  • Inbound IDOC & Comminication in Nomination

    We have a scenario on the Mining industry where we created nomination (T Cd : O4NSN ) for transport of coal by railways . The outbound communication  IDOC was successfully sent to a Transport Agency and is reflected in the u201C Communication Tabu201