I want to create the design of a SQL database that will hold the data entered from a dynamic created websites (something like http://www.wufoo.com).
Users of the system will create forms by dragging controls into the form and then they will use the created forms to build a website by including the forms in some pages.
What would be the options that I have when I create the architecture of the database.
Since you do not know what you will get in your DB, how the object will look like; I would suggest using NoSql.
Otherwise you need to create some very abstract table, let's say Form, and then make in inheritable by other tables (ye, you can do that in EF)
Related
I know that each time a user registers in my ASP.NET MVC application the ApplicationUser class is used to create the new record and put it in the database.
I was wondering if it's okay to add properties to that class for example I want the model to have a column in the database for DateOfBirth. Then use that class(model) directly in my application when I have to do some business logic things, database queries and similar stuff. Or is it more correct to create a new table in the database called let's say ApplicationAccounts, that saves the general info about the account. Each ApplicationAccount will be associated with a ApplicationUser(1 to 1 relation) and be somewhat of a buffer in the communication with the real accounts. Does that make sense?
I would go with the second option : create your own table, link them up in a one to one relationship using the UserID as a unique foreign key and then go from there.
One note here, it is perfectly normal for the model you need for the views to be different from the database model, this is because your db model can hold a lot of data that your view doesn't actually need. You might want to consider having separate models and use something like Automapper for a quick translation from one to another.
I have a datasource table in lightswitch server.
i need to add the table fields dynamically(each 1 minutes) in code behind...
how to achieve?
If you want to get information into the application, something is going to have to push the information in. I'll assume that you'll use an external application to do so, this way you'll have more control over the insertion of data.
You can do so either via the OData interface, or directly into the SQL database. I'd recommend going through the OData interface as you get the benefits of the LS business logic and security.
To do so, you'll need to write a separate program that acts as or uses an OData client. You'll also have to add a service reference to this program that targets the LS app. You can then create the required LS app type (in your case, Table), and save the changes to the LS app.
You can check out http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v3/calling-an-odata-service-from-a-net-client for a detailed example of how this is done.
I am developing a website which uses tables in UI, and our customer wants that the users can customize the columns they want to see in UI for each table, and to store this settings inside the Database.
My question is: what is the cleanest way to support this feature into the Database, avoiding to have the data stored coupled to the UI?
I mean a tool like dynamic scaffolding in Grails. I do not write about static scaffolding which stores View files on disk drive since I would like to avoid it. Moreover I don't take Ruby on Rails into account because dynamic scaffolding in RoR was deprecated.
More than 10 years ago I wrote a fully functional application using a PHP framework generating CRUD interface dynamically. For each database table I had to:
give a SQL query reading a list of rows that were later displayed on a web page in an automatically generated, paginated, orderable and searchable browser,
give a list of fields to display together with their types and labels (and optionally with their initial values displayed on Create pages),
give titles of CRUD pages,
implement functions other than CRUD.
It was easy to build a complete application using this framework and the application was fully functional so I know that even dynamically generated views can be used in production. Unfortunately the framework was not an open source.
I am developing a system with a master database and multiple databases, once for each client. The client database and its tables will be created when the client fills in and submit a form with all the required details.
My question: does the Yii framework support the dynamic creation of databases and tables? If so, is there any example code? (I'm still learning about Yii) I couldnt find an answer on the Yii website (documentation and forum) nor on this site. (I did notice that dynamic databse connections are possibble with Yii - Yii Dynamic DB Connection according to user?)
For connections in runtime read php-yii-database-connect-in-runtime and after that, Yii have all Building Schema Manipulation Queries like CREATE, ALTER, DROP etc.
So easy and simple.
building-schema-manipulation-queries