How to create tables dynamically in Google app engine - google-app-engine

Hey can anyone tell me how can i create tables dynamically in GAE.I want to create a friend list like in Facebook where i can store the details of my friends.Likewise everyone will have a table of their own.I cannot make a single table because if someone is my friend he might have people who are not my friends so why should i store their details.
I've searched a lot but not found anything.
Also please suggest some alternatives if possible.

In that case you can use namespaces.
https://developers.google.com/appengine/docs/java/multitenancy/multitenancy

For an example of dynamic table creation, you can look at Google's ShardedCounter class at https://developers.google.com/appengine/articles/sharding_counters to see how the name of the table (really Entity in GAE) can be composed at runtime.

Related

How do websites use information on a database to create pages?

Sorry about the broad question. I'm just curious if someone could point me in the right direction.
Say there's a database of contact information, and there's a site where you can input a persons name and it brings you to a page with all of their information on that database. How does this happen exactly? The server would have to dynamically create this page, but does it have a generic format that it just fills with the information? And how does this happen?
Like you said, this is a an extremely broad question. It could be either way. The server could generate the entire contents dinamically, or it could be "filling the blanks" into a preformatted layout.
Google some PHP basic tutorials. That should give you a good idea about how this "dynamism" works. Sorry but your question is too broad to ellaborate more.
The server would dynamically create the page using PHP and SQL. There is a quick tutorial at http://www.mysqltutorial.org/php-querying-data-from-mysql-table/ that shows how it would be setup.
If I understood your question right, you are asking things like how this page was created, for example, in which case it can be as simple as a basic PHP and SQL combination. You can check an example on the w3sschools website:
Try it yourself example
There would be special place holders for the data and a query will extract the data and put it into the given place holders, please note, you can also use loops to add things like tables, fetch through multiple rows and so on.

Many-to-Many relationship Database in Windows Phone 8.1

I have a simple task:
To build notepad with hashtags.
So user will be able to add a note and to add a list of #hashtags to it.
Basically I will have 2 objects:
Note
Hashtag
I want to be able to access all:
Assigned hashtags to a specific note by note.RelatedHashtags
Assigned notes to a specific hashtag by hashtag.RelatedNotes
It sounds like many-to-many, but I can't find any code example that I can learn from for Windows Phone. Also it sounds like I need to add a third object (table) to keep the data in the needed structure, but than how the mappings should be configured?
The most informative link I found so far:
http://www.geekchamp.com/tips/windows-phone-mango-local-database-sql-ce--association-attribute
Thank you.
The solution was quite simple - to create a third table and relate it to both Notes and Hashtags tables.
I found some very useful code example here.
P.S.: Don't forget to check Local database best practices for Windows Phone

How to integrate a PACS server (DCM4CHE) with personal database

Hi i am a newbie to programming. I have 100 or so CT scans stored on a PACS (dcm4che). I am trying to link all patients to a teaching file database (simple django application) which will have teaching points on each case. Can someone direct me to a tutorial or a brief direction to what sort of programming will integrate the two? i do realise the generic nature of the question. I have 20 days to work on this so am willing to start from scratch
Thanks
I would recommend against anything specific as diving into dcm4che. Instead if you would like to use standard API, you should use the QIDO-RS/WADO API provided by dcm4chee.
One of the main author did also document how to install such instance here
I would suggest to bind yiur django app or project to the appropriate dcm4chee databese. Since you have all priviliges just create a new table within dcm4chee database which has a simple foreign key column named SOPinstanceUid. In this column you just store the SOPinstanceUId of your preferred images. Then of course you can additionally provide all columns you need for your teaching problem.
You can of course also create a seperate database and bind your django app to both databases and use the SOPInstance uid also as main key to establish the relationship between dcm4chee db and teaching db.
Within your django app you can then of course manage your teaching table or db and query the filenames of the images which you have selected for teaching.The key of this relationship is the SOPInstanceUID of the dicom image.
This approach just needs some expertise in SQL, some knowledge of the preconfigured database and of course django and DICOM.

Auto-complete and some technical in web application

I have some problems still do not understand and I need help.
In some web application like Facebook, when I type a word to find my friends or places, apps..., a suggestion list appear for me. I can traverse and choose one of them.
So I want to ask something:
Best or good tool, language or something like that to do this? I think it's jQuery. More options for me?
Which is a list item in the suggestion list called?
Where did these things from? I means: how can I create or take them? From database directly?
The answers are:
You can use jQuery coupled with a server side language that retrieve the data
Usually it's called suggestion list. These function is Google is called Google suggest
The data are retrieved from the database

Can we create table for wordpress?

I am very new to wordress. I have a appointment form. While submitting a form i need to save those information from the form to the database. I created a table of my own lets say wp_appointment and saved the information to this table. Now what i want to know is that is this a good way to do so or is there any solution to this. And i need to display those information in admin section and update. Is it possible? Please do suggest me if i can do or not.
Thanks in advance
Now what i want to know is that is
this a good way to do so or is there
any solution to this.
Yes, this is the ideal way to doing this. Besides, there is something to consider:
For ease of use and compatability, you can use wordpress's built-in database functions. Check this one: wpdb Class
And i need to display those
information in admin section and
update. Is it possible?
Sure. You can create a custom admin page and show/make editable them in there. As a start point check this link: Adding Administration Menus. You can apply the instructions told there to your function.php file to have custom pages without create an "external plugin".
To answer your questions: Yes, it's possible. And what you described is being done by current calendar plugins.
Here is one:
http://wordpress.org/extend/plugins/events-calendar/
I would take a look at their code to see how they implement something similar to your idea.

Resources