Creating the DDL -- the SQL is the same regardless if the 1 side of the 1:M

is optional or not.
Example:
Entity STUDENT has Student_ID as UID and a Student_Name. Entity LOCKER has LOCKER_ID as its UID and a location.
I created a sample 1:M relation between STUDENT and LOCKER where each STUDENT may have zero or more LOCKERs and each LOCKER may be owned by one STUDENT.
The logical model in the data modeler looks like this: STUDENT - - - - - <-LOCKER.
The DDL generation in the data modeler created this SQL:
CREATE TABLE Locker
LockerID NUMBER NOT NULL ,
LockerLocation VARCHAR2 ,
Student_ID NUMBER
ALTER TABLE Locker
ADD CONSTRAINT Locker_PK PRIMARY KEY ( LockerID ) ;
CREATE TABLE Student
Student_ID NUMBER NOT NULL ,
StudentName VARCHAR2 (20)
ALTER TABLE Student
ADD CONSTRAINT Student_PK PRIMARY KEY ( Student_ID ) ;
ALTER TABLE Locker
ADD CONSTRAINT Relation_6 FOREIGN KEY
Student_ID
REFERENCES Student
Student_ID
ON DELETE SET NULL
I modified the relationship so that each STUDENT MUST have one or more LOCKERs so the logical model now looks like this: STUDENT--- - - - <- LOCKER but the DDL generated the exact same SQL.
Is this correct or did I forget something in the model?
Edited by: user2014134 on Jan 16, 2011 11:37 PM

I tried both version 2 and version 3 of the Oracle data modeler with the same results.
I'm using the Barker notation for the logical model in case you were thinking that was an arrow pointing to student -- it's actually crow's feet.
The logical model looks like this when the relationship is not mandatory (e.g. a student may or may not have one or more lockers)
STUDENT - - - - - - - - - - <- LOCKER
and the logical model looks like this when the relationship is mandatory (e.g. a student must have one or more lockers)
STUDENT -- (solid line) -- - - - - - - - - - <- LOCKER
Should I expect the relational model to be different for both of these? And the DDL as well? The data modeler is showing me the same thing for either (in versions 2 and 3).

Similar Messages

  • IO Error while creating the Datasource in WLS Console

    Hello,
    We are using Jdeveloper 11.1.1.1.7, I am trying to create a Data Source using WLS Console, I am getting below error
      - I tried creating DB connection using SQL developer with same DB Connection info, it works fine.
      - I verified the Port by logging into corresponding UNIX box where weblogic server is running, I did telnet, and able to connect.
    any ideas are appreciate.
    Connection test failed.
    IO Error: The Network Adapter could not establish the connection<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)<br/>oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:678)<br/>oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:234)<br/>oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)<br/>oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)<br/>oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:404)<br/>oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:674)<br/>oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:267)<br/>oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:134)<br/>weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:314)<br/>com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:734)<br/>com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:474)<br/>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br/>java.lang.reflect.Method.invoke(Method.java:606)<br/>org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)<br/>org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)<br/>org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)<br/>org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)<br/>..

    The Network Adapter could not establish the connection exception is caused by one or more of the following configuration errors:
    The database host name, port number, or database instance name is wrong.
    The database TNSListener has not been started. The TNSListener may be started with the lsnrctlutility.
    C:>lsnrctl start
    1. What is the connection url?
    2. Is Oracle database running?

  • Using Data Pump to get a copy of all the CREATE TABLSPACE DDL in a database

    I have been looking through the documentation for a way to export.
    I was thinking I could get the DDL using the below and them don an IMPDP SQLFILES=yyy.sql
    cat expddl.sql
    DIRECTORY=dpdata1
    JOB_NAME=EXP_JOB
    CONTENT=METADATA_ONLY
    FULL=yes
    DUMPFILE=export_${ORACLE_SID}.dmp
    LOGFILE=export_${ORACLE_SID}.log
    I would have thought you could just do an INCUDE on the tablespace but it does not like that.
    10.2.0.3

    I would like to know why you want create tablespace DDLs ? As if you have to import it on the same machine (or the machine with similar mount points) the import should do that automatically for you. And if you have to do it on some other machine, you can always use SQLFILE option to generate DDL from the export dump.
    Regards,
    Amardeep Sidhu

  • Creating the report in BI Publisher with SQL SERVER 2008

    Dear Team,
    I want to create report on BI Publisher....i am able to create report with the help of oracle database ...but i dont'nt know how to create DATA MODEL in sql server 2008 ...
    plz tell me the wright way....
    Thanks,
    Him..

    Hi Jin Chen,
    Thank you for your response. I have disabled all the Symantec End Point Protection Service, but problem persists..
    Further, I have checked through the ULS Log in SharePoint, there is more error reported there:
    11/03/2010 15:19:48.44 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   Database                      
    6f8g Unexpected
    Unexpected query execution failure, error code 282. Additional error information from SQL Server is included below. "The 'proc_GetTpWebMetaDataAndListMetaData' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be
    returned instead." Query text (if available): "{?=call proc_GetTpWebMetaDataAndListMetaData(?,'F77D6A37-F8D2-492C-911C-923C8A135DEB',?,NULL,1,?,?,6187)}"
    11/03/2010 15:19:51.46 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    11/03/2010 15:19:51.69 ReportingServicesService.exe (0x3510)  
    0x1EEC
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    Do you have any idea based on the error above?

  • Need To Create a table in Sql Server and do some culculation into the table from Oracle and Sql

    Hello All,
    I'm moving a data from Oracle to Sql Server with ETL (80 tables with data) and i want to track the number of records that i moving on the daily basis , so i need to create a table in SQL Server, wilth 4 columns , Table name, OracleRowsCount, SqlRowCount,
    and Diff(OracleRowsCount - SqlRowCount) that will tell me the each table how many rows i have in Oracle, how many rows i have in SQL after ETL load, and different between them, something like that:
    Table Name  OracleRowsCount   SqlRowCount  Diff
    Customer                150                 150            
    0
    Sales                      2000                1998          
    2
    Devisions                 5                       5             
    0
    (I can add alot of SQL Tasks and variables per each table but it not seems logicly to do that, i tryid to find a way to deal with that in vb but i didn't find)
    What the simplest way to do it ?
    Thank you
    Best Regards
    Daniel

    Hi Daniel,
    According to your description, what you want is an indicator to show whether all the rows are inserted to the destination table. To achieve your goal, you can add a Row Count Transformation following the OLE DB Destination, and redirect bad rows to the Row
    Count Transformation. This way, we can get the count of the bad rows without redirecting these rows. Since the row count value is stored in a variable, we can create another string type variable to retrieve the row count value from the variable used by the
    Row Count Transformation, and then use a Send Mail Task to send the row count value in an email message body. You can also insert the row count value to the SQL Server table through Execute SQL Task. Then, you can check whether bad rows were generated in the
    package by querying this table.  
    Regards,
    Mike Yin
    TechNet Community Support

  • How to get cm:search to use the max attribute when creating the SQL query?

    When we use the max attribute in the cm:search tag, it does not seem to honor the max attribute when creating the SQL query. However, the result returned from the tag is limited to the number specified by the max attribute. Then the tag seems to work as intended, but the performance will be sub optimal when the SQL query returns unnecessary rows to the application.
    We use the cm:search tag to list the latest news (ordered by date), and with the current implementation we have to expect a decrease in performance over time as more news is published. But we can’t live with that. We need to do the constraint in the SQL query, not in the application.
    The sortBy attribute of cm:search is translated to “order by” in the SQL query, as expected.
    Is it possible to get cm:search to generate the SQL query with an addition of “where rownum <= maxRows”?

    Hi Erik,
    The behavior of a repository in regards to the search tag's max results parameter is dependent on the underlying repository's implementation. That said, the OOTB repository in WLP does augment the generated SQL to limit the number of rows returned from the database. This is done in the parsing logic. This behavior may differ with other repository implementations.
    -Ryan

  • While creating the Data source for Sql server am getting this error?

    Hi i new to Power BI sites and office 365,
    For my first step 
    1. i have successful creaeted Gateway in Office 365
    2.Now i have creating  the Data source for that gateway using Sql server R2
    3.While Creating the Data source using the Corresponding gateway i have given and next phase set Credentials  phase i have noticed one pop up window and it will shows me like
    Data source Settings and  below in that window it will show's u the things like 
    Datasource Name.
    Loading......
    Credentials type:
    Privacy Level:
    Failed to verify parameter
    I will get this results finally  ,so hw should i achive this probelm ,Please let me know if any one knows
    So kindly give me the proper answer for this.
    Regards

    Any suggestions for Chinnarianu?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Unable to see my project template after creating the same

    Hi All,
    I Created one (Multi Org)Organization and enable all the required secutiry profiles (HR: Business Group, HR:Security Profile, HR:User Type,MO:Security Profile),When i am creating the Project Template unable to see the same template its moving to some other Org its showing.
    what i have to check in setups. could you please any one.
    Thanks

    Hi Murali,
    Can you check whether you have setup the following profile options for that responsibility to see the created templates.
    PA: Cross Project User -- Update
    This option allow you to update the project with out assignment on the project.
    PA: Cross Project User -- View
    This option allow you to view the project templates by using that responsibility.
    Best Regards,
    Sreenath

  • Can't open Keynote files after last update. I created the files with Ipad 2, the same Ipad which won't open the files now. No Mac involved. What can I do to habe access again?

    Can't open my Keynote files after last update on Ipad 2. I created the files on the same Ipad. No Mac involved. What can I do to open and use the files again?

    Finally, this helped me:
    https://discussions.apple.com/message/23602871#23602871

  • How to determine via SQL who created the sales order

    Hello I am trying to determine via SQL who created the Sales Order.  I'm looking at the ADOC table but having a hard time determining which record points to the sales order creation.

    Hi Jimmy,
    Try this:
    select
         T0.[DocNum], T2.[DocDate], T2.[CardCode], T2.[CardName],
         T1.U_NAME as [User Name], T2.UpdateDate as [Cancelled Date]
    from
         ORDR T0
         inner join OUSR T1 on T0.UserSign = T1.UserID
         inner join ADOC T2 on T0.DocNum = T2.DocNum
    where
         T2.LogInstanc = (select min(LogInstanc) from ADOC T3 where T3.ObjType = 17 and T3.DocNum = T0.DocNum and T3.CANCELED = 'Y')
         and T2.CANCELED = 'Y'
         and T2.ObjType = 17
    group by
         T0.DocNum, T2.DocDate, T2.CardCode, T2.CardName, T1.U_NAME, T2.UpdateDate
    Kind Regards,
    Owen

  • Why i cannot create the sql azure database from my own country 'Nepal' ?. why it is not include in the list of country when we sign up for azure database. :( !!!

    why i cannot create the sql azure database from my own country 'Nepal' ?. why it is not include in the list of country when we sign up for azure database. :(  !!!
    canot we try this new feature ,dosnot we need to try this too..why such discermination for our country nepal. :(

    Hi Anil,
    I am Mahesh from Microsoft Innovation Center. From August 2014 we have made Azure Available to Nepal. You can now directly sign in to azure with your Nepal Based Mobile Number as Verification.
    Thanks for showing your Interest in our Product.
    Mahesh Dahal

  • 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.

  • Problems creating the Master Repository with MS SQL Server 2000

    Hello guys!
    I can't create the Master Repository with MS SQL Server 2000 database.
    Wath is the correct adress in the URL?
    I select the Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver and the URL: *jdbc:microsoft:sqlserver://<host>:<port>;SelectMethod=cursor[;<property>=<value>...]*
    Thanks
    Maurício
    Edited by: user857262 on 03/10/2008 10:05

    Hi Maurício,
    For MS SQL Server the following drivers should avaliable in /drivers folder (http://www.inetsoftware.de/),
    * msutil.jar
    * mssqlserver.jar
    * msbase.jar
    JDBC Driver is:
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    JDBC URL is:
    jdbc:sqlserver://serverName\instance:port;property=value[;property=value]
    Example,
    jdbc:sqlserver://myHost:1433;selectMethod=cursor;databaseName=myDB
    Thanks,
    G

  • Do we need to create the mx records if the send/receive the mail in the same organization?

    1,May I know do we need to create the mx records if we send/receive the mail in the same organization?
    2,If we send /receive the mail between two different organization/forest, we need to create the mx records  ,is it right?
    Please click the Mark as Answer button if a post solves your problem!

    1,May I know do we need to create the mx records if we send/receive the mail in the same organization?
    2,If we send /receive the mail between two different organization/forest, we need to create the mx records  ,is it right?
    Please click the Mark as Answer button if a post solves your problem!
    for 1. If you mean the same Exchange org, no.
    For 2, it depends. You need a MX record for your receiving SMTP server ( At least, You *should* have one), but if sending to another org, not necessarily, as you could smarthost messages to it and a MX would not be required.
    Just curious, what problem are you trying to solve?
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Fife days App Store not give it to me the verify code, I made I lot email adress, changed and create the new, still the same problem, and this is second one iPad that I bought this month, if not help me I don't know how to deal, thank you in advance

    Fife days App Store not give it to me the verify code, I made I lot email adress, changed and created the new, still the same problem, and this is second  iPad that I bought this month, if not help me I don't know how to deal, thank you in advance, maybe I will go to shop and want my money back

    Do you have a technical question for us volunteer users?

  • TS4036 I tried to restore my iPad from the cloud backup but the iCloud returned the following message 'no backup available'? This after happened after I created the backup today and the same was confirmed at the Apple Store attendant

    I tried to restore my iPad from the cloud backup but the iCloud returned the following message 'no backup available'? This after happened after I created the backup today and the same was confirmed at the Apple Store attendant

    Check the console app to see if there are any error messages. I had one app showing an issue (Pet Hotel) the error was (truncated):
    ERROR: Restore message response: 102 rename error: File name too long (63) at path "/var/mobile/Library/SafeHarbor/com.pocketgems.tappethotel/Container/Documents/ savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHis tory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGa meHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/sa vedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHisto ry/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGame History/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/save dGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory /savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHi story/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedG ameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/s avedGameHistory/savedGameHistory/savedGameHistory/savedGameHistory/savedGameHist ory/savedGameHistory/1313349538-pocket_gems_crash_report.txt" (MBErrorDomain/102)
    I manually snyc'ed that particular app and then re-ran the restore and am now the proud owner of a working iphone. Not sure it is the same problem or app but looking in the console was the key!

Maybe you are looking for

  • Account Determination error during Import MIGO transaction

    Dear ppl, Could any body help me in resolving this issue? While doing MIGO transaction for import PO, the following error message is surfacing. - Accoun determination forentry NML______N100______3000 not possible. Its not at all showing the accountin

  • IOError in IE but not in Firefox (possible crossdomain.xml problem)

    Yesterday, I hopefully debugged a problem that is occuring for our application in IE but not in Firefox. It has to do with accessing remote content from a separate domain. In every aspect it APPEARS to be a crossdomain.xml issue but the fact that thi

  • Double byte file name in KM NW04

    Prior to NetWeaver 04 using the HTML editor, we could name a file in a double byte language (Simplified/Traditional Chinese) by entering the English name in the "ID" field and then entering the double byte name in the "Name" field using "File/Details

  • The best export settings for 6x4 & 5x7 prints...

    Hi guys, I am using iphoto '08 and was hoping that someone can assist me with what export settings to use for 6x4 and 5x7 prints. I have 800 odd pics that I want to upload to an online printing company who happen to have a special on at the moment. I

  • IPhone/iTunes music lost - how to get it back without having to pay again?

    I have an iPhone 3Gs I am very frustrated and upset at the moment. I have spent a lot of money over the past year on downloading music for my iPhone, some of it straight to the phone and sometimes straight into iTunes. Now I just upgraded to the 4.0