Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Create Database and relations using raw SQL DDL

raw sql ddl

  • Please log in to reply
4 replies to this topic

#1 astone42

astone42

    Passenger

  • Members
  • 2 posts

Posted 23 April 2014 - 11:06 AM

Hello! I started learning ruby and ruby on rails last week in order to use it on a university assignment. In the assignment report I need to provide sql DDL that created the database, and DDL of the queries I used in the assignment. Can I do something like that using Ruby on Rails ? I just started learning about ActiveRecords and migrations and I'm pretty confused.

 

Thanks in advance for your help! 



#2 Ohm

Ohm

    Driver

  • Moderators
  • 398 posts
  • LocationCopenhagen

Posted 24 April 2014 - 06:55 AM

Isn't what you want exactly the migrations? The requirement for the assignment sounds like the TA would just want to be able to set up the application and database.


Blog: http://ohm.sh | Twitter: @madsohm

#3 astone42

astone42

    Passenger

  • Members
  • 2 posts

Posted 25 April 2014 - 10:58 PM   Best Answer

Isn't what you want exactly the migrations? The requirement for the assignment sounds like the TA would just want to be able to set up the application and database.

 

Thanks a lot for your relpy. My question was not clear enough I suppose. Anyway the problem was that the assignment was asking for the sql ddl that created the database and I thought that I have to write raw sql in RoR in order to create the models. 

 

Anyway I created the models using the RoR way and just got the mysqldump for the assignment. Thanks again for your time :)



#4 renoldscott

renoldscott

    Passenger

  • Members
  • 6 posts
  • LocationUSA, NY

Posted 10 June 2014 - 08:33 AM

I agreee with Ohm


From User Interface Design and Coding Services at whitepaperit.com


#5 jasonelve

jasonelve

    Signalman

  • Members
  • 10 posts

Posted 17 July 2014 - 10:44 AM

The need for the task appears to be like the TA and would just want to be able to set up the program and data source.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users