spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » DATABASE » Page 1
Creating checkboxes based on a value for something else
For the last point in your question - yes. This could be done using a bound form and a little VBA or a query. You would just add a Checkbox to your form, and in the OnClick event, set your field to Date in VBA or Date() in SQL. For your main question, add this field to your query: IIf(IsNull([TaskCompletionDate]),"No","Yes") Right click the field you just added in QBE, and select Properties.

Categories : Database

How can I import data from .csv to a table which has auto increment column?
The trick is to use a sequence instead of an identity here. The docs describes the differences between sequence, auto_increment and identity. What is of interest to you, is that you can indeed force a value of a column with a sequence. Of course, be careful yourself to not have duplicate and to set the next value of the sequence afterwards to make sure you will avoid future duplicates. The simpl

Categories : Database

Get column values from a Haskell Database
There are a couple strange things in your code; for example: lookupColumn :: [(Column, Integer)] -> [Integer] lookupColumn ((c, i):cvs) = if null cvs then [i] else [i] ++ lookupColumn cvs is much longer to type in every way than the equivalent (and probably faster) map snd. Furthermore when you're defining your own data structures often tuples are superfluous; you could just write: data

Categories : Database

suggetion for a database design
Your text explaining what kind of service you want to deliver is a good lead about what type of models you need. You write about 'admins' and 'messages' but those models are omitted. I also think that 'request' is a property of a Service. Maybe go for more general terms? Client, Supplier, Message, Service, Manager, Product. The Service needs a state field: new, assigned, needs more X... Then yo

Categories : Database

Can you have a composite key when in Third Normal Form (3NF)?
You can have a compound key in every normal form. In fact, when you write functional dependencies in the form A->B, both A and B refer to sets of attributes. That's why they're in uppercase; uppercase letters represent sets in set theory. ...all of the non-key attributes appear to be reliant on Both of the primary keys... There's only one primary key. In your case, that one primary key

Categories : Database

Difference between knowledge base and database
The differences between databases and knowledge bases are diminishing. Traditionally they have been the following: Databases offer various properties that make them fit for transactional processing. Prolog does not offer those. On the other hand the Prolog database and knowledge bases in general permit to store general terms/data while (traditional) databases required flat data. Prolog can also

Categories : Database

ORA-28000: account is locked error in expdp
Does the new password have special characters that could cause the shell script to behave differently? May be helpful to know the account_status: select username,account_status from dba_users; This would tell us if the account is getting locked due to too many failed logins or is someone running "alter user account lock".

Categories : Database

one to many vs many to many - Books and authors
The bidirectional associations allow you to navigate both sides of this relationship both in Object space as well as in JPA/Hibernate Query Language. In your example, a database many-to-many association is mandatory (meaning you have a BOOK, an AUTHOR and a BOOK_AUTHOR link table). Hibernate offers two possibilities for mapping this relationship: You can model this with two entities: Book and A

Categories : Database

Doctrine ORM linking foreign key to multiple tables
You "resolve" this by accepting the fact that you will have multiple tables "with similar structures". The reason for which you have tables is not their structure, the reason why you have tables is because of what they (and their contents) mean to the end user. So the decision about which number of tables to have, should be driven first and foremost by what meaning they represent to the user, wi

Categories : Database

Can not find data from collection in mongodb
You're running into a problem with the asynchronous nature of Node.js. If you run this, it's possible for collection.find to complete before collection.insert. Try this instead. var mongo = require("mongodb"); var host = '127.0.0.1'; var port = 1337; var db = new mongo.Db('nodejs-introduction', new mongo.Server(host, port, {})); db.open(function(error, dbClient) { console.log('We are connect

Categories : Database

How to unit test the database access logic without database
If you are looking for an in memory database you can use this: http://www.sqlite.org/ It's popular for what you are describing. At that point you can read your xml files in and write them to this database to use for your tests. Another option would be to store the data in class objects related to your database tables. This is actually what I do since I'm using an ORM (nhibernate) and already

Categories : Database

Knockout if, click and visible binding
You want to use the visible binding. This will show and hide the entire element, while the if binding just controls the contents of the element. Here's a demo. However in this case, I would go with @Vladimirs answer as you can wrap the virtual element around all 3 of your buttons, rather than binding them all individually.

Categories : Database

Refreshing Database VB.NET
I think your problem is this section: '-------For every row, print the message, skip a line, and add 1 so it goes to next msg-------- For i As Integer = 0 To tbl.Rows.Count - 1 rowIndex = i strOutPut &= CStr(tbl.Rows(rowIndex)("Message")) & vbNewLine i = i + 1 Next Why are you skipping a line? This will cause every other message in the table to not be written out, and there

Categories : Database

How to bind/referece grand parent property to/inside child knockout
As per me, the better way to do is to have the child viewmodels inside the parent view-model. like this where you can access the parent data members as well as methods directly. ViewModel var BoardViewModel = function(){ var self = this; this.members = ko.observableArray(); this.lists = ko.observableArray(); // Child View Models this.Member = function(member){ this

Categories : Database

Database tuning performance from play framework in play scala project
According to the exception's message you want to apply a db operation (whatever create, select, update or delete this may be) on an already closed connection. Could you past some code? btw: I'm running bonecp 0.8.0 as well and I'm not experiencing these exceptions with using this (development) config: db { default.driver=org.postgresql.Driver default.url="jdbc:postgresql://.../database" d

Categories : Database

Count both sides of a partition in ReQL
Create an index on isQualified r.table('Candidate').indexCreate("isQualified"); Then use it to count r.expr({ 'qualified': r.table('Candidate').getAll(true, {index: "isQualified"}).count() 'unqualified': r.table('Candidate').getAll(false, {index: "isQualified"}).count(), }) This is way faster as the server doesn't have to iterate through all the documents, but just has to traverse a B-tr

Categories : Database

How to use different values for sort and display in DataTables 1.10
I finally found a way to achieve this, by creating another hidden column for the milliseconds value, and then I pointed the orderData property of the 'Date Range' column to the hidden column. $('#reportList').dataTable({ "data" : reportData, "columns" : [ { "title" : "Report Name", "data" : "title" }, { "title" : "Range In milliseconds", "da

Categories : Database

Binding polymer paper-dropdown-menu to localstorage
I believe that the recommended way of using <paper-dropdown-menu> is to have a two layers of containers between it and the <paper-item>s, based on the example from the current docs. If you're using that setup, you've now got a <core-menu>, which inherits from <core-selector>. Things that inherit from <core-selector> can make use of the selected attribute to control w

Categories : Database

index advice - multiple columns or identity
The best index strategy is to delay index design until such time as it's needed. For foreign keys, you've explicitly ruled them out for the present. An index costs you time at insert and update time, and saves you time at query time. What kinds of queries are you going to be doing? What is the relative frequency and relative urgency of each query? That will guide you towards the right indexes

Categories : Database

What Normal Form does this violate?
Since it's a key plus one single attribute, the design satisfies 6NF. And since there is currently no NF above 6, no normal form at all is violated. Don't misrepresent this as also implying that it is a good design (the EAV link has already been pointed out to you).

Categories : Database

I want to connect openshift mongodb database from my local client tools
I use mongovue also. Just do a 'rhc port-forward ' Then run mongovue using the Mongodb credentials that OPENSHIFT gave you. Steps. rhc port-forward <app-name> Wait a couple of seconds. You then should see something like this. Then run Mongovue. Add a connection and enter in your Openshift Mongodb credentials like this: Save, Select your connection, and press connect.

Categories : Database

How to prevent visual studio from creating a new database
Are you using a dataset? Try calling acceptchanges method to save your new data... Use dataset.tables(0).acceptchanges ... See http://msdn.microsoft.com/en-us/library/system.data.datatable.acceptchanges(v=vs.110).aspx

Categories : Database

Mirror instance not up then Principal instance was down
I just made it work. I remove all and create again with set port 5022 for all instances instead of 5023 and 5024 as a article. You must set diffirent port when all instances only stored in a SERVER

Categories : Database

VB 2008 Search dataset.table by Textbox.Text as variable
You need to think of the select command as the WHERE part of an SQL Select. Your code should be something like: myArray = myDataSet.myTable.Select("PRODUCTID = " & myID) This assumes you have a field named PRODUCTID in that table and it is numeric. If it were text/string, you would need to enclose in quotes: myArray = myDataSet.myTable.Select("PRODUCTID = '" & myID & "'")

Categories : Database

Find the points using Oracle spatial directly in front of a polgon
It sounds like you're looking for a Nearest Neighbour implementation - Oracle provides the Spatial operator SDO_NN. You can find more details here: http://docs.oracle.com/database/121/SPATL/sdo_operat.htm#SPATL1032 This will only get you so far, in that it'll find the nearest point to a polygon, but it won't guarantee that there are no polygons between your point and your target polygon. I susp

Categories : Database

Better / Other way of selecting data in cassandra
If it makes sense performance-wise to use an index (see When to use and not use an index), consider using a User Defined Type. In 2.1.2, you use the frozen keyword. You cannot update parts of a user-defined type value. The entire value must be overwritten. Cassandra treats the value of a frozen, user-defined type like a blob. CREATE KEYSPACE abc_ks WITH REPLICATION = { 'class' : 'NetworkTo

Categories : Database

Create partition is using timestamp with local time zone [Oracle 11g]
You can't interval partition on a column of that type. You could potentially add a virtual column that has the UTC equivalent of you local time zone timestamp, and partition on that instead: CREATE TABLE "XPTO" ( "XPTO_DATE" TIMESTAMP (6) WITH LOCAL TIME ZONE, "XPTO_GMT" TIMESTAMP (6) GENERATED ALWAYS AS (SYS_EXTRACT_UTC("XPTO_DATE")) ) STORAGE(BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FL

Categories : Database

Spotfire - Data source reference missing while moving library & data source from 5.5 to 6.5 server
I had similar issues, but I was doing the export/import process from 5.0 to 6.5. However, the following steps solved the issue: Export and import only the data source(s) first (it can be done easily if you keep the data source(s) in a separete folder) Export and import all the elements/columns (again it can be done easily only if you have these in a separate folder) Export and import the infolin

Categories : Database

OrientDB classes / clusters design
Partly depends on your record counts and desired response time. In our experience separating the data into clusters greatly improves query times at the expense of more complexity (managing the clusters, different queries, etc.). We put a couple million records in each cluster and add some home-made indexes to make query times quick. You really should generate some test data and store it both wa

Categories : Database

Neo4j - understanding cypher querying
So you probably want to use OPTIONAL MATCH. Your query forces neo4j to match a certain pattern. If the pattern doesn't exist, then you don't get your matched data back. In this case you want all PRODUCT_VERSIONs, not just the ones that have parents, also the ones that don't. So try this query instead: MATCH (tp: TPPRODUCT_VERSION {TPPRODUCTCODE: "Z1115"})<-[:IS_TPBOMPARENT_OF]-(pv: PRODUCT

Categories : Database

Is search in database is always accurate?
First, let me answer your question: Is search in database is always accurate ? No. One good example is bloom filters. Bloom filters represent sets, and you can do the following operations on them1: add - adds an element isInSet - checks if a given element is in the set or not. The thing is, bloom filters are probabalistic data structures. They have False Positives (you ask is an element

Categories : Database

Detecting FAT directory entries
It's unlikely that you can do a perfect job of identifying the directory entries, but you should be able to get reasonable results by using some simple heuristics. As you said, you can start by looking for a . character at offset 0x00. If it's not there, then the entry is definitely not a directory. Bit 4 of the file attributes (offset 0x0B) is set if it's a directory entry. If that bit is not s

Categories : Database

Can one attribute in the functional dependency be null?
Codd would simply have excluded tuples with nulls from the application of functional dependencies. As far as I know, there is no self-consistent way to cope with functional dependencies in pure SQL, using Codd's 3-value logic. I would therefore expect most people to tell you to avoid nulls. Obviously, that is not always received as a practically useful recommendation. There has been academic wor

Categories : Database

How does data denormalization work with the Microservice Pattern?
I think this is subjective but the following solution worked for me, my team, and our DB team. At the application layer, Microservices are decomposed to semantic function. e.g. a Contact service might CRUD contacts (metadata about contacts: names, phone numbers, contact info, etc.) e.g. a User service might CRUD users with login credentials, authorization roles, etc. e.g. a Payment service migh

Categories : Database

Avoiding PostgreSQL deadlocks when performing bulk update and delete operations
Use explicit row-level locking in ordered subqueries in all competing queries. (Simple SELECT does not compete.) DELETE DELETE FROM table_name t USING ( SELECT id_A, id_B FROM table_name WHERE id_A = ANY(array_of_id_A) AND id_B = ANY(array_of_id_B) ORDER BY id_A, id_B FOR UPDATE ) del WHERE t.id_A = del.id_A AND t.id_B = del.id_B; UPDATE UPDATE table_name t

Categories : Database

Foxpro combobox binding from database
There are several ways you can do this, from querying the table into an array, writing as a SQL query, etc and setting up the properties. What I would suggest for a start is this. Open your form. Right-click anywhere in the form and pick "Data Environment". If the category table is NOT already shown in the window, right-click and select Add. It will prompt you to pick a table and select your ca

Categories : Database

Strategy for filtering big data in cassandra db
In your example you are performing an equality search on three fields to return a product ID. Create a table specifically for this query. Since the configurations are unique, identify them as the partition key and cluster on the product_id. create table product_by_color_shape_size ( color text, size int, shape text, product_id uuid, //(or int) price int, PRIMARY KEY ((co

Categories : Database

Database table to keep track of objects
I believe the problem is in your definition of the entity "settings". If settings is a recipe, like "I made the hamburger id XX using Bob's recipe". If Bob's recipe is a record in a table, or the "settings" of the hamburger, then you should not just update it without keeping some sort of version control about it. I believe the correct way to model this problem is to relate what "has been made" w

Categories : Database

Using Mesos instead of Sharding Database
Mongo specifically? probably not, no. Currently there's no support for persistent storage and Mongo isn't really dynamic enough to run well in that sort of environment. You could try Cassandra or Elasticsearch to get an idea of the concepts - a Google should show tutorials for both.

Categories : Database


Recently Add
To insert a user info to another wp site using $wpdb
Creating checkboxes based on a value for something else
How can I import data from .csv to a table which has auto increment column?
Get column values from a Haskell Database
suggetion for a database design
Can you have a composite key when in Third Normal Form (3NF)?
Difference between knowledge base and database
ORA-28000: account is locked error in expdp
one to many vs many to many - Books and authors
Doctrine ORM linking foreign key to multiple tables
Can not find data from collection in mongodb
How to unit test the database access logic without database
Knockout if, click and visible binding
Refreshing Database VB.NET
How to bind/referece grand parent property to/inside child knockout
Database tuning performance from play framework in play scala project
Count both sides of a partition in ReQL
How to use different values for sort and display in DataTables 1.10
Binding polymer paper-dropdown-menu to localstorage
index advice - multiple columns or identity
What Normal Form does this violate?
I want to connect openshift mongodb database from my local client tools
How to prevent visual studio from creating a new database
Mirror instance not up then Principal instance was down
VB 2008 Search dataset.table by Textbox.Text as variable
Find the points using Oracle spatial directly in front of a polgon
Better / Other way of selecting data in cassandra
Create partition is using timestamp with local time zone [Oracle 11g]
Spotfire - Data source reference missing while moving library & data source from 5.5 to 6.5 server
OrientDB classes / clusters design
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.