Oracle 9i: Lock table from clearing table data - oracle9i

I was wondering if there's a concept in oracle like locking database table from clearing it's contents or deleting the table itself.
Is there a way?
please excuse me if this`s not a proper question.
Thanks in advance.

You can lock table like this way:
LOCK TABLE employees
IN EXCLUSIVE MODE
NOWAIT;
EXCLUSIVE permits queries on the locked table but prohibits any other activity on it.

Related

FireBase adding data to tables manually

I have 3 tables that I want to populate in my iOS application looks like the following:
What I want to do is find a way to manually populate the last two tables myself, so that when a user comes in and registers (and inputs the ipconfigcode) I will be able to look up the two tables I manually entered. Is this possible? If so could you point me in the right direction or explain how to do so?
That would be a ton of help!! Thanks in advance!!

Get Details of Deleted Stored Procedures and Functions of DB2

I want to get the details of the Deleted Stored Procedures and Functions
Also i want to get the info like when it was created & removed in DB.
Please guide me.
Thanks in Advance...
You can see when procedures and functions were created by looking at the CREATE_TIME column tables in the system catalog like SYSCAT.PROCEDURES and SYSCAT.FUNCTIONS.
You will have no way of knowing when these objects were dropped unless you enable auditing within the database (and review the audit logs to find instances of DROP PROCEDURE or DROP FUNCTION).

iOS program structuring - SQLite and View Controllers

I'm looking to get some insight on a project of mine before I get too deep into it with possibly a poor setup. The app is a simple database collection with a few table views.
Quick example:
First table view is populated with teacher names. Select the teacher and the next table view is populated with all of the students in that class. Further, select that student and an info view arises with details for that student.
The plan is to use SQLite, so I'm looking to make sure I set views up properly to make it easier on myself later.
My thoughts so far:
TeacherViewController - Grab info from DB to populate the table view. Contains segue within didSelectRowAtIndexPath to jump to StudentView.
StudentViewController - Again grabs info from the DB from that teacher's table to populate with students, with a segue to jump to info page.
StudentInfoView - Contains the forms ready to be populated with info.
There needs to be the ability to add teachers, as well as add students within each teacher/class. Since I haven't dove into SQLite yet, I'd like advice from those experienced.
Thanks, and let me answer any questions you may have.
The most important thing I have found when using SQLite is to ensure that you arrange your views in line with large data captures.
For instance I have a word game and the most intense call to the DB is to generate the starting position of the game. So I do this in a separate thread whilst playing a tutorial, when the viewController first loads. The rest of the calls are quick and easy so can be done at the required time within the game without any impact on performance (i.e. this includes lines like select count(*) from six where word = '%#' - where the DB table has 22000 words)
You will find that sqlite calls are very quick. I think your approach sounds fine as the large calls will be done on the load of the viewControllers where you can easily add loading indicators.
One thing to bare in mind - which can get an app rejected is where you store the sqlite db - because if it is to large then you need to ensure that it isn't backed up via iCloud without asking the user for permission.

google-fusion-table add column to view

My situation is this:
I have one master fusion table with all data about all clients (with permissions only to me).
I created another table that will have limited info (with permission to my team)
I decided I need to collect another piece of information. I CAN add a column to the master table, but I can't find a way to now select the column for the limited views. The only option I can see is delete the very elaborate limited view, and re-do it from the beginning.
There has to be a better way! What am I missing?
Thanks :)
I think at the moment this can not be done, because it's not possible to change the definition of a view after it has been created. This would be a nice feature, though. You can request it on the project site ;)
All you can do now is create a new view. What exactly is "elaborate" about the current view? It shouldn't be too hard to "migrate" to a new one.

database structure for threads that are editable by many users?

at the moment i have a column "user_id" in the "threads" table cause one thread belongs to an user.
i want to make it like Stackoverflow that one thread can be editable by many users and you can see when they edited, what they edited, roll back changes and so on.
im using symfony, is there a plugin for this?
if no, are there any 3rd part libraries/plugins to download for this to integrate to existing database?
cause i have no idea how to implement this. it sounds like mediawiki, something that already exists?
thanks
Using User id as a way of remembering the original creator of the thread. Then just let any user edit a thread, don't limit to only the creator.
To do rollbacks you will need to store versions of your thread. One way would be to have a thread table and a version table.
The thread table would point to the current version, but if you need to rollback you can simply retrieve it from the versions table which should hold the history of all previous versions.

Resources